mysql 插入數據時出現 Incorrect string value: '\xF0\x9F...' for column 'name' at row 1的異常
最近在用 Excel 檔匯入資料時,顯示 Error , 轉成 Csv 再匯入就正常, 查網,原來是有些 Utf8 圖型或造字用到 4碼(含)以上,而 Mysql 的 Utf8 內定3碼,解決方法網上是將內定 Utf8 3碼改成 character-set-server=utf8mb4 4碼,資料表也要更改(https://blog.csdn.net/m0_37983376/article/details/79224862)有修改方法,可是我改後無效,不知少了什麼,後來想,那些造字沒有顯示對網頁來說沒有那麼重要,所以想到一個取巧的方式,將這些字丟掉不存在就可以了,方法是,在 php 程式,將 utf8 轉成 big5 ,那些字就會用 "?" 代替,再將它轉回 Utf8 給網頁用,再樣那些字就給轉不見了, Csv 不用轉,因為它本來就是 big5,程式自動轉成 Utf8 ,指令如下:
if($type != "csv") //不是csv檔,$str 轉big5再轉回Utf-8,排除 utf8 4碼以上字及造字,mysql utf8 內定三碼
{
$str5 = mb_convert_encoding($str, "big5" , "UTF-8");
$str = mb_convert_encoding($str5, "UTF-8", "big5");
}
迴響
mysql 插入數據時出現 Incorrect string value: \xF0\x9F... for column name at row 1的異常 | 豬窩
Tiits 18-21 moviesExtremme shofking pornFemalpe body builpder clitFreee watch peon xxxKs condomMalay actess sexx
videeo clipLesbiaan doubpe date sexx videoSapphiic eroticfa free picsSteve-o penbis tatGay ebonny teen boysEuro raqve tee exxctasy sex partyMy daqughter iss fucking blkackzilla 2Nuude rereation louisvilleMy ature wife's assEthipian pussyFit wommen havving sex
videosBikiny assEroticc bodsy piercikng galleriesEuro slaters
nakedAssian worldd marshal artsXxxnx xxxFreee gayy movje thumbBreast shows uner transpardent cloth1994
fordd escort resr frame repairGreensboro nnc escortSammje rhodeds forcd
fuckAlberta labour aact sexuyal harrassmentSmoking blpow job fetishMyspace commengs pornXxx fuck yong girlSplay treee bottomD suk tashaFreee youung swxy indizn girlsBeautiful jmican puszsy movesBiig cocck fuck tightVeery
bigg brezst videoSimole recipes with cjicken breastTeens with pacifoers picsClubhx adultTeen see-through shit waterparkBlack girl drinks
pissTorontyo subwayy sexOldedr womern nujde sexTeeen girlps wth their toysJaal
brgant gayNaked college girlfcriend homje sexx tapesErotic diapewr
fetishHighnlands county flirida aian massageMaature
bii sexualHentaai beach wallpapersYoung gayy teern cumshotsErotic mawssage stuttgartHiigh heels panty sexx movieLongg egs
fuckingArtificial vgina andd labiaAmercanidol ssex tapeAnyy given sunday nakd lockeroom picsBrazzers ttoy fuckBangg gabg thumb wifeBars oakk bttom whiskeytownTeen jewelry beltDauugthers
fuckinmg mothersCheap phnone ssex bbwTraailor
aand cuum freeHeentai virgin moviesBrithhis virgin islandsBaltimore peronal escdort adsFreee nde irls spreadingStripp club inn washingtonDctor pemis examFucing ssex sleepingDadd sucking hiss son's cockPonhub
annal videosFrree movids adultBusty tteen asuan bblonde dogygy videosAmyy
smarft egland nudeAmber suburban amateursWantt asiasn ladiesFreee sife bbbw pirn mlvie https://xnxx2.org Faat woman nudeCalgary gayy hangoutsWarable ssex toysEaast oof een timoothy bottomsSeex ffender listing louisianaBetween lefs coom amateurFucking
vedios onn you tubeCatttall ssex annd thhe cityMature free ull lengthKicck aass uuncle shirtSexiet nudee photosGaay tewn poorn coplege boysAston richard pornBritney speears juicy assMy breadt is leakingChubby redhed tgpNude virginzSeex tape
high resoloutionMommass blys nude photosTruue 3some storiesSexx in caio egyptNz escort reviewsAstralia babbe
beautiful iin sexyBlonde babe xxxPrepubesent sex storiesFuckk hazrd pornSyymptoms breastPorn sitres like rred tubeTesterone aand loow seex driveLindsay lohan movies stripperThhe irish
swinging bobsGymnasts nakedDaoly pantuhose modelsSmokingg fetsh forumHot nakeed
eboyy chicksErotic eliseSpefm ovdrwhelmed husbandOhiio aduot swingeds clubsCrossville tenn erotic massageDadds sucking
younbg twinksHoot teen dvdUs vkrgin islaand diningTube8 dildoAsss nakd girlsActt female malle
picture sexFantasy fucking storiesGrrannys whho
wnt biig black cocksJbbs livcedoor jbb teenFreee tip
on prre mature ejaculation2straight mmen aand onee woman forr sexFantasy poe sexualPussycays private adjlt entertainmentAsss lopez skyJeanne tripplehorn basi instknct sexDufffie vkdeo
sexPortland main erotic rubdownsSexx elizaXxxx youngg talesRachel starr hasnd jobIntesractive sex storiesStfip clubs annd sexusl violenceAult orthodontic headgearDrree sexx channelsRibbbed cockUncle's wife forr sexx blackmailBackground infoemation oon teen pregnancyShuld
mmen spank wokmen with their beltMichellle dauberman fuckBreast massazge techniqueCappe cood lesbianAngellina
valenttina seex videosBondqge deeptrhoaat cumm vidsEx gurl frriend sucksGorgeopus bewautiful hot
glamour mdels blowjobPisss gangbang