reading wchar_t , and unicode from text file

i need to read unicode from text file

Page 1 of 1

3 Replies - 27622 Views - Last Post: 16 August 2006 - 10:11 PM Rate Topic: -----

#1 juliaprocess  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 6
  • Joined: 16-August 06

reading wchar_t , and unicode from text file

Posted 16 August 2006 - 10:11 AM

:D hello

Let's say i type spanish or Arabic in a text file, i need to read it in as wchar_t and display it somewhere else later, how do i do that
Is This A Good Question/Topic? 1

Replies To: reading wchar_t , and unicode from text file

#2 frog  Icon User is offline

  • unleashed
  • member icon

Reputation: 2
  • View blog
  • Posts: 683
  • Joined: 26-March 06

Re: reading wchar_t , and unicode from text file

Posted 16 August 2006 - 11:24 AM

i think the following link should help you out
http://www.cprogramm...al/unicode.html
Was This Post Helpful? 0
  • +
  • -

#3 juliaprocess  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 6
  • Joined: 16-August 06

Re: reading wchar_t , and unicode from text file

Posted 16 August 2006 - 07:26 PM

thank you

i didn't expect this to be that complicated, does this mean i can't just type any foreign text into a text file and have it read in directly, from the way i understand the article, you have to do extra encoding to the text file then decode that
Was This Post Helpful? 0
  • +
  • -

#7 Mrafcho001  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 41
  • View blog
  • Posts: 769
  • Joined: 01-November 05

Re: reading wchar_t , and unicode from text file

Posted 16 August 2006 - 10:11 PM

thats correct. You'd have to do binary read and write to the file if you want to preserve the text in UNICODE format. otherwise you have to cconvert it to single byte text.

I dont really like that article at cprogramming.com, im no expert on UNICODE but all my programs (non-dos) are UNICODE only and i've had no problem i find it easy to use and very convenient. The file i/o i do in binary mode and i dont save it as .txt
Was This Post Helpful? 1

Page 1 of 1