I want the string Game
to convert Game
. This string is a Japanese double byte string.
Is it possible to achieve this using PHP? If so, how?
I want the string Game
to convert Game
. This string is a Japanese double byte string.
Is it possible to achieve this using PHP? If so, how?
First of all,
Game
is not ASCII charset, so you might need to set the pageContent-type
header to see a proper output:Then you can convert it using this function
EDIT:
For MySQL I couldn't find a converter to do the same. However, you can still convert it manually on the Hex level, for example, you can get the word
Game
like thisSo, we can just write a mapping function in MySQL that replaces the characters using this table
Well, can't say for sure whether I got your question right, but the following console one-liner:
gives me the following:
Is this what you want? As Mark Baker already said, it's just the case of
mb_convert_encoding
for you.you can try for this function mb_convert_kana