Solved

shift_jis to utf-8 conversion

Posted on 2004-08-09
6
1,305 Views
Last Modified: 2008-03-04
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
0
Comment
Question by:t_swapnil
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
6 Comments
 

Author Comment

by:t_swapnil
ID: 11752014
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
 
LVL 1

Expert Comment

by:dumbo2569
ID: 11778260
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
 

Author Comment

by:t_swapnil
ID: 12109504
Sorry for not updating .. I found the anser..
iconv_open(strToCodePage,strFromCodePage)

Thanks,
Swapnil
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 12119186
PAQed, with points refunded (200)

Computer101
E-E Admin
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question