shift_jis to utf-8 conversion

how can I convert text in shift_jis encoding to utf-8 ? I am using AIX 4.3 (not windows) . any help is appreciated :-) ..thnx
t_swapnilAsked:
Who is Participating?
 
Computer101Connect With a Mentor Commented:
PAQed, with points refunded (200)

Computer101
E-E Admin
0
 
t_swapnilAuthor Commented:
I need to check if how can I convert shift_jis to ASCII..Then I can think of one way as -
1) shift_jis to ascii
2) ascii to unicode using mbstowcs
3) convert unicode to utf-8 ???

Is there any simpler way ?
0
 
dumbo2569Commented:
UTF-8 is backwards compatible with ASCII. If you convert shift_jis to ASCII, then it is already UTF8. There is no need to convert ASCII->UNICODE->UTF8.

All ASCII characters are represented the same in UTF-8.



0
 
t_swapnilAuthor Commented:
Sorry for not updating .. I found the anser..
iconv_open(strToCodePage,strFromCodePage)

Thanks,
Swapnil
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.