0

I have a string with double byte, now I want convert to 1 byte.

Example:

$input = "2012/12/31";

I want to output: 2012/12/31

For C#: How to Convert Double Byte String to Single Byte String?


Found the anwser from:

how to transform japanese english character to normal english character?

However mb_convert_kana in my pc not run

mb_convert_kana("2012/12/31", "rnaskhc");
Community
  • 1
  • 1
Thien Nguyen
  • 928
  • 10
  • 12
  • 1
    If you know encoding of original string you may use `iconv` (http://www.php.net/manual/en/function.iconv.php) – hindmost Feb 07 '14 at 08:28

1 Answers1

1

You're looking for the function mb_convert_kana, most likely with the mode as (zen-kaku alphanumerics and spaces to han-kaku). "Double byte" is the wrong term, those are full-width characters.

deceze
  • 510,633
  • 85
  • 743
  • 889
  • This is better: http://stackoverflow.com/questions/14776998/how-to-transform-japanese-english-character-to-normal-english-character Thank you for your keyword – Thien Nguyen Feb 10 '14 at 01:57