[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#315416: marked as done (gnat: Incorrect upper/lower case handling in Ada.Text_IO.Enumeration_IO)



Your message dated Thu, 10 Apr 2008 16:27:43 +0200 (CEST)
with message-id <Pine.LNX.4.64.0804101620450.23756@www.sslug.dk>
and subject line Re: Bug#315416: gnat: Incorrect upper/lower case handling in Ada.Text_IO.Enumeration_IO
has caused the Debian Bug report #315416,
regarding gnat: Incorrect upper/lower case handling in Ada.Text_IO.Enumeration_IO
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
315416: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=315416
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: gnat
Version: 3.15p-12
Severity: normal


It appears that "Ada.Text_IO.Enumeration_IO" doesn't convert its
output correctly to lower case, when the enumeration contains
non-ISO-646 characters.

It appears that the reason for the problem is an extremely ugly hack
in "Ada.Text_IO.Enumeration_AUX".  I suggest that the OS/2 specific
problems in "Ada.Characters.Handling.To_Upper" and
"Ada.Characters.Handling.To_Lower" are corrected and that the local
versions of "To_Upper" and "To_Lower" are removed from
"Ada.Text_IO.Enumeration_AUX".

 * A.3.2(25) and A.3.2(26) contains the definition of lower-case and
   upper-case letters.

 * A.10.10(10) and A.10.10(11) explains that
   Ada.Text_IO.Enumeration_IO.Put should should output in lower-case
   or upper-case depending on the parameter Set.

==============================================================================
GNAT version:

GNATMAKE 3.2.2 20030222 (3.2.2-4) Copyright 1995-2001 Free Software Foundation,
Inc.

==============================================================================
Output:

Upper case: Ã?
Lower case: Ã?
Upper case: Ã?
Lower case: Ã?
Upper case: Ã?
Lower case: Ã?
Upper case: Ã?
Lower case: Ã?
Upper case: Ã?
Lower case: Ã?
Upper case: Ã?
Lower case: Ã?
Upper case: Ã?
Lower case: Ã?
Upper case: Ã?
Lower case: Ã?

==============================================================================
Expected output:

Upper case: Ã?
Lower case: á
Upper case: Ã?
Lower case: ð
Upper case: Ã?
Lower case: í
Upper case: Ã?
Lower case: ó
Upper case: Ã?
Lower case: ú
Upper case: Ã?
Lower case: ý
Upper case: Ã?
Lower case: æ
Upper case: Ã?
Lower case: ø

==============================================================================
Source code:

with Ada.Text_IO; use Ada.Text_IO;
procedure Example is
   type Some_Non_ASCII_Letters is (á, ð, í, ó, ú, ý, æ, ø);
   package Non_ASCII_Letter_Text_IO is
     new Enumeration_IO (Enum => Some_Non_ASCII_Letters);
   use Non_ASCII_Letter_Text_IO;
begin
   for Letter in Some_Non_ASCII_Letters loop
      Put (Item => "Upper case: ");
      Put (Item => Letter, Set => Upper_Case);
      New_Line;
      Put (Item => "Lower case: ");
      Put (Item => Letter, Set => Lower_Case);
      New_Line;
   end loop;
end Example;

==============================================================================

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: powerpc (ppc)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.8-powerpc
Locale: LANG=fo_FO.ISO8859-1, LC_CTYPE=fo_FO.ISO8859-1 (charmap=ISO-8859-1)

Versions of packages gnat depends on:
ii  binutils                    2.15-7       The GNU assembler, linker and bina
ii  libc6                       2.3.2.ds1-22 GNU C Library: Shared libraries an
ii  libc6-dev                   2.3.2.ds1-22 GNU C Library: Development Librari
ii  libgnat-3.15p-1             3.15p-12     The GNU Ada 95 compiler runtime li

Versions of packages gnat recommends:
ii  ada-reference-ma 20021112web-3           The standard describing the Ada 95
ii  gnat-gdb         5.3.gnat.0.0.20030225-8 Ada-aware version of GDB
ii  gnat-gps         2.1.0-4                 The GNAT Programming System - adva

-- no debconf information


--- End Message ---
--- Begin Message --- I've compiled the test case with GNAT 4.1.2 20061115 (prerelease) (Debian 4.1.1-22). This gives the expected result:

Upper case: Á
Lower case: á
Upper case: Ð
Lower case: ð
Upper case: Í
Lower case: í
Upper case: Ó
Lower case: ó
Upper case: Ú
Lower case: ú
Upper case: Ý
Lower case: ý
Upper case: Æ
Lower case: æ
Upper case: Ø
Lower case: ø

[ Converted to UTF-8:

Upper case: Ã?
Lower case: á
Upper case: Ã?
Lower case: ð
Upper case: Ã?
Lower case: í
Upper case: Ã?
Lower case: ó
Upper case: Ã?
Lower case: ú
Upper case: Ã?
Lower case: ý
Upper case: Ã?
Lower case: æ
Upper case: Ã?
Lower case: ø

]

Greetings,

Jacob
--
»But you have to be a bit wary of a ship that collects
 snowflakes.«                                  -- Diziet Sma

--- End Message ---

Reply to: