/    Sign up×
Community /Pin to ProfileBookmark

I am very confused. I have a mysql table with band names in it. The band’s field is created like this:
band VARCHAR (150) character set utf8 collate utf8_bin.
It has always worked fine until this week, but I messed something up this weekend. Letters with accents show up as question marks in diamonds and Japanese characters are just plain question marks.
If I use utf8_encode() on the data then letters with accents display fine but Japanese characters still don’t.
The puzzling part is that if I take the data from the table, write it to an XML file and then display it on a page, everything looks perfect. Is that a good enough clue for anybody to tell me what I have done wrong? I would rather not use XML as a middleman all the time.

Edit: Fixed. The problem seems to be that I closed the connection to the database, and then I reopened it later in the code. Somehow that broke something. I don’t know how, but it’s fixed anyway.

to post a comment
Full-stack Developer

0Be the first to comment 😎

×

Success!

Help @zombieJones spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...