delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/03/25/19:52:16

From: Jason Green <news AT jgreen4 DOT fsnet DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: foreign char ( almost corect )
Date: Mon, 27 Mar 2000 00:55:40 +0100
Organization: Customer of Planet Online
Lines: 22
Message-ID: <k18tdscj2d0kaffgo1ao6vk9el9blb1cft@4ax.com>
References: <lD9C4.1556$1C2 DOT 146525 AT news20 DOT bellglobal DOT com> <cT4D4.8747$n03 DOT 411986 AT news20 DOT bellglobal DOT com>
NNTP-Posting-Host: modem-244.vanadium.dialup.pol.co.uk
Mime-Version: 1.0
X-Trace: news6.svr.pol.co.uk 954029189 2063 62.136.22.244 (26 Mar 2000 00:06:29 GMT)
NNTP-Posting-Date: 26 Mar 2000 00:06:29 GMT
X-Complaints-To: abuse AT theplanet DOT net
X-Newsreader: Forte Agent 1.7/32.534
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"Robert L." <vlad3 AT sympatico DOT ca> wrote:

> Now
> cout<<"\x90";
> work well.

It would be useful to know what you did to fix this.

> But
> cout<<"\x90crivez"; // écrivez == write
> doesn't work, it say the same error ( escape secquence out of range )

This is expected behaviour for standard C/C++.  If MSVC compiles this
without error then MSVC has a bug, not DJGPP.

All hex digits after the \x are read as being a single character. So
the first character of the string is interpreted as 90C hex, which of
course is out of range.

You should use 3-digit octal:

cout << "\220crivez";

- Raw text -


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