Thien Nguyen
Thien Nguyen

Reputation: 928

PHP Convert Double Byte String to Single Byte String?

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");

Upvotes: 0

Views: 2415

Answers (1)

deceze
deceze

Reputation: 522352

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.

Upvotes: 1

Related Questions