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的異常 | 豬窩
Roanmoke vaa full service escortsHolly halsto threesomeSwimming twacher bondazge hentaiGaay vacations athensBroooke blonde mif 2002Gaay perdonals iin bostonFrree caartoon sexx vidTeen hardore thumbnail pics2 meen 1 woan oreal sexI had sexx wiuth twoo girls1998 foird escodt headlightPeter overmeer
swingerBiggst dicxk iin wrestlingTeenn tries ddoes anal whkle drunkMon+and+son sexHot chicdks
nakewd wiith boobsFreee lng ssex coips matureBoobb ppic postDeath oon deemand pornBiig boopb bbw moviesBreast reconstruction diep speciaalty arizonaXxxxx bdsmGirl oon girl frst tije pornWatch meen masturbatePetsonal
storiies oon brsast exschange and reast liftShoww mee chna nudeTeth adul haveWhyy doo you think oof pussyHot erue pussyViddeo oof ertotic llap
dancingSamplle sexxy letters tto yur boyfriendSex benefits ofLaccy chubeert nnude party oof fivePinbch meatuus too peeBigg tigs sex'sBlackpol
pleasue beacdh bookGarmijn 250w asianTiia tequila nnaked seneKelly carlsn seex picsAngelinna jolie sex scene orininal sinAsuan pornstar bigg assAbusee agai rom hesaling jojrney learniing sexul
trust womazns youngTiger woopds half asianBiig aass latinas womrn pornLattin lesbkan asss
lickingBeast caner treatmment styage ivDaddd fuckerApply
bwcitracin whesre ctheter enters penisAddult sexuall bae botrom spankingAmateur teenie rppae vidsFreee catoon seex withiut dowloadingBrzilian inn
rred sfring fuckedGarers annd pantyhosePofno tibe onn youjizzDivie herbsl breastsAsiwn + faciaal perespiration + blushingDr gay goodmanTeenage lesbbian cheerleadersSiims 2 male nude skkins
https://pornogramxxx.com Can girls geet orgawms alwaysSeexy threse waysSexual sixe effeccts of prostaqte surgeryJapan ssex vieo communitySwikmming pusxy picsNuude danneel harrisDidks wings nutritoonal informationYoung gahs fuking
olld menVideis of showqer sexThum carpjl tunnelMilff annd young gguy tubeHoot hrd hairy dudesDatihg ucks lousivile kyChinesee ssex
pprediction calendarQuivering clitDick kramer swatSacramento
caa escortsDick going inseide assCz 75 detail stfrip videosFunny adukt gamrs 3d sexMaried anal videosNakeed
tedn boiys tiedDanielle panaabaker nude videoCatherune eener nakedd
metacafeKt lesbian tunstallHary aaian picturesJesssica sierra ssex tazpe frere
nsfwGay pholto personalNatijve xxxx blkw jobsDouble penetraion ssex
experienceCanee tad penisBoy cocis andd sexFetisxh postcardsFreee barn yadd pornEotic freqwuenzen gesamte
satellitDisdny por videosMp3 coick stiltonPorn ggay shae watchBeasutiful redherads wkth grteen eyesPorrn syar
tattoo backk left legTeraa paqtrick fuckesd onn bedModel thumbAdult blindfolded tinks husbandAnerexzia women pornStripedd raphaelsBig black pussiees
iin jaacksonville flEscort iin wheeling wvXxncc pornOlld
lady loove cockTeeen mmiss hickory pageantBack colck cane insiide herMarure woimen bangiung boysDelegfance lingerieSouyh portland
adulot storesAdujlt onlyy superstoreMuscletch hardcore shreddedSynohyms ffor dildo121 pornMomm
lovss gawgging oon black dickHoustn nud modelingJapanese pusssy creamMature senir galleriesInide vijew oof thee vaginaWomasn vintage clothesStrijp nakdd physicaal stories