comp.lang.ada
 help / color / mirror / Atom feed
* ISO LATIN_1 in Windows 95 ?
@ 1998-10-05  0:00 Hans Marqvardsen
  1998-10-06  0:00 ` Jacob Sparre Andersen
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Hans Marqvardsen @ 1998-10-05  0:00 UTC (permalink / raw)


Does anyone know how to use ISO Latin_1 under Windows95?

EG so that Put(Character'val(230)) 
will in fact print LC_ae_diphtong,
as defined in Ada.Characters.Latin_1 ?

(Under NT, you can use SetConsoleOutputCP(1252) and the 
font Lucida Console, but neither of these seem available
in W95)

--Hans, hm at ddre dot dk




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ISO LATIN_1 in Windows 95 ?
  1998-10-05  0:00 ISO LATIN_1 in Windows 95 ? Hans Marqvardsen
  1998-10-06  0:00 ` Jacob Sparre Andersen
@ 1998-10-06  0:00 ` dewarr
  1998-10-07  0:00 ` Jerry van Dijk
  2 siblings, 0 replies; 9+ messages in thread
From: dewarr @ 1998-10-06  0:00 UTC (permalink / raw)


In article <3618A5D5.72C@ddre.dk>,
  hm@ddre.dk_nospam wrote:
> Does anyone know how to use ISO Latin_1 under Windows95?
>
> EG so that Put(Character'val(230))
> will in fact print LC_ae_diphtong,
> as defined in Ada.Characters.Latin_1 ?
>
> (Under NT, you can use SetConsoleOutputCP(1252) and the
> font Lucida Console, but neither of these seem available
> in W95)


There probably is some answer to this, I don't know what it is. Another
possibility suitable in some circumstances is simply not to use Latin_1,
but instead use one of the PC code pages that includes dipthongs etc.
GNAT fully supports both of the standard PC code pages likely to be
used in this environment (the US one and the European one).

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ISO LATIN_1 in Windows 95 ?
  1998-10-05  0:00 ISO LATIN_1 in Windows 95 ? Hans Marqvardsen
@ 1998-10-06  0:00 ` Jacob Sparre Andersen
  1998-10-06  0:00   ` dewarr
  1998-10-10  0:00   ` Markus Kuhn
  1998-10-06  0:00 ` dewarr
  1998-10-07  0:00 ` Jerry van Dijk
  2 siblings, 2 replies; 9+ messages in thread
From: Jacob Sparre Andersen @ 1998-10-06  0:00 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1480 bytes --]

Hans Marqvardsen (hm@ddre.dk) wrote:
: Does anyone know how to use ISO Latin_1 under Windows95?

: EG so that Put(Character'val(230)) 
: will in fact print LC_ae_diphtong,
: as defined in Ada.Characters.Latin_1 ?

Doesn't it do that?

: (Under NT, you can use SetConsoleOutputCP(1252) and the 
: font Lucida Console, but neither of these seem available
: in W95)

Ah. So the problem is actually how to get _Windows_95_ to use Latin-1 as
the character encoding in command line windows? I think this question
belongs on "comp.os.ms-windows" or something like that.

You can't have a working Ada compiler on/targeting a system that can't
interpret all of Latin-1 (strictly speaking). The usual solution seems
to be to assume that the character encoding _is_ Latin-1 in such cases.

GNAT has some flags to specify what character encoding is used for the
source files, so you might be able to extract some useful code from the
GNAT sources.

Greetings,

Jacob

PS: I think CP 1252 refers to Unicode BMP - a 16 bit character encoding - so
    it is "reasonable" that Windows 95 can't handle it.

----------------------------------------------------------------------------
--  Jacob Sparre Andersen     --  E-mail: Jacob.Sparre.Andersen@risoe.dk  --
--  National Laboratory Ris�  --  Phone.: (+45) 46 77 51 23               --
--  Systems Analysis          --  Fax...: (+45) 46 77 51 99               --
----------------------------------------------------------------------------




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ISO LATIN_1 in Windows 95 ?
  1998-10-06  0:00 ` Jacob Sparre Andersen
@ 1998-10-06  0:00   ` dewarr
  1998-10-07  0:00     ` Hans Marqvardsen
  1998-10-10  0:00   ` Markus Kuhn
  1 sibling, 1 reply; 9+ messages in thread
From: dewarr @ 1998-10-06  0:00 UTC (permalink / raw)


In article <6vde32$jle$1@news.net.uni-c.dk>,
  sparre@meyer.fys.ku.dk (Jacob Sparre Andersen) wrote:
> Hans Marqvardsen (hm@ddre.dk) wrote:

> You can't have a working Ada compiler on/targeting a system that can't
> interpret all of Latin-1 (strictly speaking). The usual solution seems
> to be to assume that the character encoding _is_ Latin-1 in such cases.


Well that's not quite right, or at least it is misleading. There is nothing
in the Ada standard that prescribes the actual appearence of input or output
characters, so in fact the encoding does not have to be "right" to have a
conforming compiler. There must be an external representation for every
Latin-1 character, but what this external representation might look like
is not part of the standard.



-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ISO LATIN_1 in Windows 95 ?
  1998-10-05  0:00 ISO LATIN_1 in Windows 95 ? Hans Marqvardsen
  1998-10-06  0:00 ` Jacob Sparre Andersen
  1998-10-06  0:00 ` dewarr
@ 1998-10-07  0:00 ` Jerry van Dijk
  2 siblings, 0 replies; 9+ messages in thread
From: Jerry van Dijk @ 1998-10-07  0:00 UTC (permalink / raw)


Hans Marqvardsen (hm@ddre.dk) wrote:

: Does anyone know how to use ISO Latin_1 under Windows95?

: EG so that Put(Character'val(230)) 
: will in fact print LC_ae_diphtong,
: as defined in Ada.Characters.Latin_1 ?

Hmmm, from memory, ANSI_FIXED_FONT should on the console be
equivalent to LATIN_1.

Jerry.
-- 
-- Jerry van Dijk  | email: jdijk@acm.org
-- Leiden, Holland | member Team-Ada
-- Ada & Win32: http://stad.dsl.nl/~jvandyk




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ISO LATIN_1 in Windows 95 ?
  1998-10-06  0:00   ` dewarr
@ 1998-10-07  0:00     ` Hans Marqvardsen
  1998-10-08  0:00       ` Jacob Sparre Andersen
  0 siblings, 1 reply; 9+ messages in thread
From: Hans Marqvardsen @ 1998-10-07  0:00 UTC (permalink / raw)


dewarr@my-dejanews.com wrote:
> Well that's not quite right, or at least it is misleading. There is nothing
> in the Ada standard that prescribes the actual appearence of input or output
> characters, so in fact the encoding does not have to be "right" to have a
> conforming compiler. There must be an external representation for every
> Latin-1 character, but what this external representation might look like
> is not part of the standard.
> 
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own


Thanks for the clarification.

But isn't it confusing, that the external representation of
for example 
Ada.Characters.Latin_1.LC_AE_Diphtong
looks nothing like an AE-diphtong in lower case,
but rather looks like the greek letter mju ?

Is it really the case, that no codepage usable in Windows95 
corresponds to Ada.Characters.Latin_1 ?

Of course, one might argue, that if so, this is a Windows95 problem, 
not an Ada95 problem.  Closing the question without solving the problem.

-- Hans




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ISO LATIN_1 in Windows 95 ?
  1998-10-07  0:00     ` Hans Marqvardsen
@ 1998-10-08  0:00       ` Jacob Sparre Andersen
  1998-10-12  0:00         ` Georg Bauhaus
  0 siblings, 1 reply; 9+ messages in thread
From: Jacob Sparre Andersen @ 1998-10-08  0:00 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 966 bytes --]

Hans Marqvardsen (hm@ddre.dk) wrote:

: Is it really the case, that no codepage usable in Windows95 
: corresponds to Ada.Characters.Latin_1 ?

Jerry suggested "ANSI_FIXED_FONT", whatever that is.

: Of course, one might argue, that if so, this is a Windows95 problem, 
: not an Ada95 problem.  Closing the question without solving the problem.

An annoying, but usable solution would be to rewrite/modify Ada.Text_IO, so
it translates between the available character encoding and Latin-1. It is a
bit of work, but you're definitely not the only one who could use it.

Jacob

----------------------------------------------------------------------------
--  Jacob Sparre Andersen     --  E-mail: Jacob.Sparre.Andersen@risoe.dk  --
--  National Laboratory Ris�  --  Phone.: (+45) 46 77 51 23               --
--  Systems Analysis          --  Fax...: (+45) 46 77 51 99               --
----------------------------------------------------------------------------




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ISO LATIN_1 in Windows 95 ?
  1998-10-06  0:00 ` Jacob Sparre Andersen
  1998-10-06  0:00   ` dewarr
@ 1998-10-10  0:00   ` Markus Kuhn
  1 sibling, 0 replies; 9+ messages in thread
From: Markus Kuhn @ 1998-10-10  0:00 UTC (permalink / raw)


Jacob Sparre Andersen writes:
|> PS: I think CP 1252 refers to Unicode BMP - a 16 bit character encoding - so
|>     it is "reasonable" that Windows 95 can't handle it.

No, this is wrong. Microsoft Code Page CP1252 refers to what the Windows
documentation erroneously calles the "ANSI Character Set". CP1252 is
an 8-bit character set, that corresponds to ISO 8859-1 (Latin-1), with the
following additional characters in the range 128-160 that is reserved
in ANSI/ISO 8859-1 for control codes:

0x80    0x20AC  #EURO SIGN
0x81            #UNDEFINED
0x82    0x201A  #SINGLE LOW-9 QUOTATION MARK
0x83    0x0192  #LATIN SMALL LETTER F WITH HOOK
0x84    0x201E  #DOUBLE LOW-9 QUOTATION MARK
0x85    0x2026  #HORIZONTAL ELLIPSIS
0x86    0x2020  #DAGGER
0x87    0x2021  #DOUBLE DAGGER
0x88    0x02C6  #MODIFIER LETTER CIRCUMFLEX ACCENT
0x89    0x2030  #PER MILLE SIGN
0x8A    0x0160  #LATIN CAPITAL LETTER S WITH CARON
0x8B    0x2039  #SINGLE LEFT-POINTING ANGLE QUOTATION MARK
0x8C    0x0152  #LATIN CAPITAL LIGATURE OE
0x8D            #UNDEFINED
0x8E    0x017D  #LATIN CAPITAL LETTER Z WITH CARON
0x8F            #UNDEFINED
0x90            #UNDEFINED
0x91    0x2018  #LEFT SINGLE QUOTATION MARK
0x92    0x2019  #RIGHT SINGLE QUOTATION MARK
0x93    0x201C  #LEFT DOUBLE QUOTATION MARK
0x94    0x201D  #RIGHT DOUBLE QUOTATION MARK
0x95    0x2022  #BULLET
0x96    0x2013  #EN DASH
0x97    0x2014  #EM DASH
0x98    0x02DC  #SMALL TILDE
0x99    0x2122  #TRADE MARK SIGN
0x9A    0x0161  #LATIN SMALL LETTER S WITH CARON
0x9B    0x203A  #SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
0x9C    0x0153  #LATIN SMALL LIGATURE OE
0x9D            #UNDEFINED
0x9E    0x017E  #LATIN SMALL LETTER Z WITH CARON
0x9F    0x0178  #LATIN CAPITAL LETTER Y WITH DIAERESIS

The official CP1252 to Unicode mapping can be found on

   ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1252.TXT

There is no such ANSI standard for CP1252, Microsoft refers just to
ANSI/ISO 8859-1 when they say "ANSI characterset" and added the above
extentions. The usual sloppy terminology in documentation for
the "end user".

I hope that GNAT correctly transforms CP1252 to Unicode according
to the above table when it reads a Wide_String on a Windows
platform.

Markus

-- 
Markus G. Kuhn, Security Group, Computer Lab, Cambridge University, UK
email: mkuhn at acm.org,  home page: <http://www.cl.cam.ac.uk/~mgk25/>




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ISO LATIN_1 in Windows 95 ?
  1998-10-08  0:00       ` Jacob Sparre Andersen
@ 1998-10-12  0:00         ` Georg Bauhaus
  0 siblings, 0 replies; 9+ messages in thread
From: Georg Bauhaus @ 1998-10-12  0:00 UTC (permalink / raw)


Jacob Sparre Andersen (sparre@meyer.fys.ku.dk) wrote:
: Hans Marqvardsen (hm@ddre.dk) wrote:

: : Is it really the case, that no codepage usable in Windows95 
: : corresponds to Ada.Characters.Latin_1 ?

: An annoying, but usable solution would be to rewrite/modify Ada.Text_IO, so
: it translates between the available character encoding and Latin-1. It is a
: bit of work, but you're definitely not the only one who could use it.

I've seen a solution to this problem in the TeX sources
(also in the sources for the accompanying programs tangle and weave).

Georg




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~1998-10-12  0:00 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-10-05  0:00 ISO LATIN_1 in Windows 95 ? Hans Marqvardsen
1998-10-06  0:00 ` Jacob Sparre Andersen
1998-10-06  0:00   ` dewarr
1998-10-07  0:00     ` Hans Marqvardsen
1998-10-08  0:00       ` Jacob Sparre Andersen
1998-10-12  0:00         ` Georg Bauhaus
1998-10-10  0:00   ` Markus Kuhn
1998-10-06  0:00 ` dewarr
1998-10-07  0:00 ` Jerry van Dijk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox