"合同会社Knowledge Library" => "合同会社Knowledge Library"
I want to convert only alphanumeric characters in the string to single byte using java script or php
"合同会社Knowledge Library" => "合同会社Knowledge Library"
I want to convert only alphanumeric characters in the string to single byte using java script or php
Share Improve this question edited Apr 25, 2012 at 6:48 Ibrahim Azhar Armar 25.8k36 gold badges135 silver badges212 bronze badges asked Apr 25, 2012 at 5:45 Pradeep SathyarajPradeep Sathyaraj 1342 silver badges10 bronze badges 4- Both strings look the same to me. Is that a typo? – Ja͢ck Commented Apr 25, 2012 at 5:59
- Looks same but the bytes are different, Use shift js encoding you can find the difference in bytes – Pradeep Sathyaraj Commented Apr 25, 2012 at 6:04
- @Jack Then your system does not render it properly. The full width forms should be as wide as the Chinese characters, not proportionally spaced as usual. – deceze ♦ Commented Apr 25, 2012 at 6:54
- @deceze I saw the difference in rendering, but I assumed it was SO formatting problem ;-) – Ja͢ck Commented Apr 25, 2012 at 6:56
1 Answer
Reset to default 6In PHP, use mb_convert_kana
to convert "zen-kaku" to "han-kaku".