delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/02/24/17:10:47

From: "Guido Sassmannshausen" <sassi AT sedan DOT uni-osnabrueck DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Ulmauts in std streams
Date: Thu, 24 Feb 2000 16:48:28 +0100
Organization: RRZN - Newsserver Test
Lines: 34
Message-ID: <893jpq$gbi$1@newsserver.rrzn.uni-hannover.de>
NNTP-Posting-Host: steelrose.sedan.uni-osnabrueck.de
X-Trace: newsserver.rrzn.uni-hannover.de 951407226 16754 131.173.58.129 (24 Feb 2000 15:47:06 GMT)
X-Complaints-To: abuse AT newsserver DOT rrzn DOT uni-hannover DOT de
NNTP-Posting-Date: 24 Feb 2000 15:47:06 GMT
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hello,

as my previous problem was solved that quickly, I am hopeful, this one might
find a solution too...

My code parses a text file which contains umlauts.

if I use a

string s;
instream>>s;
cout << s;

I get other characters (I think the lower 7bits of ascii standrad) instead
of theword containing umlauts.

Do I really have to use locales? or is there any other way?
Ok, I could use get() for each character and check the integer, and
translate it if necessary.
But is there a way to get the strings as intended?

This happens too if I use getline (stream, string); As soon some stream
in/output is involved umlauts are crippled.

I Hope there is someone out there who ran into the same problem.

Cheers

--
----------------------------------------------------
Guido Sassmannshausen



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019