Bug#680648: [BRLTTY] Bug#680648: brltty: A new accent problem

2012-07-08 Thread Paul Gevers
Hi,

 Is there a problem if the .po file specifies:
 
Content-Type: text/plain; charset=UTF-8\n
 
 but the user isn't using a UTF-8 locale?

Stupid question maybe, and I have not checked myself yet, but have
people verified that the po file itself is indeed utf-8? I.e. that it is
not showing an é if you open the file because your viewer is too
intelligent, because the encoding of the file is really latin-15?

Paul



signature.asc
Description: OpenPGP digital signature


Bug#680648: [BRLTTY] Bug#680648: brltty: A new accent problem

2012-07-08 Thread Samuel Thibault
Dave Mielke, le Sat 07 Jul 2012 13:54:18 -0400, a écrit :
 The code looks correct to me. The screen driver already calls gettext(), so 
 the 
 message as rturned by the screen driver is already translated. Then it gets 
 translated into wchars via brltty's convertTextToWchars(), which is mapped to 
 mbstowcs().

Where is convertTextToWchars called?  What I see in the driver in
readCharacters_LinuxScreen() is a call to setScreenMessage which just
uses strlen() and copyScreenCharacterText() without taking charset into
account.

Samuel



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#680648: [BRLTTY] Bug#680648: brltty: A new accent problem

2012-07-08 Thread Samuel Thibault
Dave Mielke, le Sat 07 Jul 2012 14:57:00 -0400, a écrit :
 [quoted lines by Samuel Thibault on 2012/07/07 at 15:10 -0300]
 
  If yes, do we know what it's being translated to?
 é 
 
 That's what it's supposed to be. I guess I should've asked if we know what 
 it's 
 being mistranslated to?

⠢⠢

 Except that the end result is not correct for some reason.
 
 Is there a problem if the .po file specifies:
 
Content-Type: text/plain; charset=UTF-8\n
 
 but the user isn't using a UTF-8 locale?

No, see man gettext: it translates into the locale charset if needed.

 In other words, I'm theorizing that our translations are stored - and 
 returned 
 - in UTF-8,

Translations are always returned in the current locale (if any).

 but mbstowcs() is using the locally-specified system encoding.

Samuel



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#680648: [BRLTTY] Bug#680648: brltty: A new accent problem

2012-07-08 Thread Samuel Thibault
Paul Gevers, le Sun 08 Jul 2012 09:17:43 +0200, a écrit :
 Stupid question maybe, and I have not checked myself yet, but have
 people verified that the po file itself is indeed utf-8?

Again, it is, yes. All other messages are just fine, it's only this one
which doesn't show up fine (and all messages are in proper utf-8 in the
file).

Samuel



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#680648: [BRLTTY] Bug#680648: brltty: A new accent problem

2012-07-08 Thread Dave Mielke
[quoted lines by Samuel Thibault on 2012/07/07 at 16:17 -0300]

Where is convertTextToWchars called?  What I see in the driver in
readCharacters_LinuxScreen() is a call to setScreenMessage which just
uses strlen() and copyScreenCharacterText() without taking charset into
account.

The message being discussed doesn't use that mechanism.

screen.c:1063: problemText = gettext(screen not in text mode);
screen.c:1072: description-unreadable = problemText;

brltty.c:3309: if (scr.unreadable) {
brltty.c:3310:   if (!isSuspended) {
brltty.c:3311: writeStatusCells();
brltty.c:3312: writeBrailleText(wrn, scr.unreadable);

brltty.c:296: int
brltty.c:297: writeBrailleText (const char *mode, const char *text) {
brltty.c:298:   size_t count = getTextLength(text) + 1;
brltty.c:299:   wchar_t characters[count];
brltty.c:300:   size_t length = convertTextToWchars(characters, text, count);

-- 
Dave Mielke   | 2213 Fox Crescent | The Bible is the very Word of God.
Phone: 1-613-726-0014 | Ottawa, Ontario   | 2011 May 21 is the End of Salvation.
EMail: d...@mielke.cc | Canada  K2A 1H7   | http://Mielke.cc/now.html
http://FamilyRadio.com/   | http://Mielke.cc/bible/



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#680648: [BRLTTY] Bug#680648: brltty: A new accent problem

2012-07-08 Thread Dave Mielke
[quoted lines by Dave Mielke on 2012/07/08 at 08:53 -0400]

[quoted lines by Samuel Thibault on 2012/07/07 at 16:17 -0300]

Where is convertTextToWchars called?  What I see in the driver in
readCharacters_LinuxScreen() is a call to setScreenMessage which just
uses strlen() and copyScreenCharacterText() without taking charset into
account.

The message being discussed doesn't use that mechanism.

I take that back. You're correct. The setScreenMessage() path is indeed being 
taken (I'll figure out why, later). In any event, setScreenMessage() has now 
(revision 6587) been converted to use mbrtowc(). Please test. That should've 
been done a long time ago, anyway. Hopefully, this was the last 
uninternationalized place in the code (but I'm sure it isn't).

-- 
Dave Mielke   | 2213 Fox Crescent | The Bible is the very Word of God.
Phone: 1-613-726-0014 | Ottawa, Ontario   | 2011 May 21 is the End of Salvation.
EMail: d...@mielke.cc | Canada  K2A 1H7   | http://Mielke.cc/now.html
http://FamilyRadio.com/   | http://Mielke.cc/bible/



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#680648: [BRLTTY] Bug#680648: Bug#680648: brltty: A new accent problem

2012-07-08 Thread Samuel Thibault
bts tags 680648 + fixed-upstream
thanks

Dave Mielke, le Sun 08 Jul 2012 10:37:49 -0400, a écrit :
 In any event, setScreenMessage() has now (revision 6587) been
 converted to use mbrtowc(). Please test.

That now works indeed.  The severity of the bug is quite minor however,
so concerning Debian, that'll be for wheezy+1.

Samuel



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#680648: brltty: A new accent problem

2012-07-08 Thread Mario Lang
Jean-Philippe MENGUAL te...@accelibreinfo.eu writes:

 Package: brltty
 Version: 4.4-2
 Severity: normal

 I experience a new accents problem. I don't understand as I remember we did
 the conversion upstream.

* What led up to the situation? I use brltty running orca on gdm3.

Please be more details.  Where is the message you quote below actually
coming from?  Is this text coming from an application you are using, or
does it come from BRLTTY's Message translations?

* What exactly did you do (or not do) that was effective (or
  ineffective)? I use utf8 and fr_FR.ttb

* What was the outcome of this action? L'??cran n'est pas en mode texte

* What outcome did you expect instead? L'écran n'est pas en mode texte

-- 
CYa,
  ⡍⠁⠗⠊⠕ | Debian Developer URL:http://debian.org/
  .''`. | Get my public key via finger mlang/k...@db.debian.org
 : :' : | 1024D/7FC1A0854909BCCDBE6C102DDFFC022A6B113E44
 `. `'
   `-  URL:http://delysid.org/  URL:http://www.staff.tugraz.at/mlang/



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#680648: brltty: A new accent problem

2012-07-08 Thread Jean-Philippe MENGUAL
Le dimanche 08 juillet 2012 à 18:34 +0200, Mario Lang a écrit :
 Jean-Philippe MENGUAL te...@accelibreinfo.eu writes:
 
  Package: brltty
  Version: 4.4-2
  Severity: normal
 
  I experience a new accents problem. I don't understand as I remember we did
  the conversion upstream.
 
 * What led up to the situation? I use brltty running orca on gdm3.
 
 Please be more details.  Where is the message you quote below actually
 coming from?  Is this text coming from an application you are using, or
 does it come from BRLTTY's Message translations?

Ok I try being clearer. When you press Alt-F7 and if orca is not running, or if 
braille support is disabled, brltty says screen not in text mode. I 
experienced this on gdm3 where I've not enabled yet orca, then until I run 
xbrlapi. That's expected.

But this message from brltty is translated. And in the translation, instead of 
[écran for screen, I get ??cran. So it's a brltty translation accents 
problem I think.

 
 * What exactly did you do (or not do) that was effective (or
   ineffective)? I use utf8 and fr_FR.ttb
 
 * What was the outcome of this action? L'??cran n'est pas en mode texte
 
 * What outcome did you expect instead? L'écran n'est pas en mode texte

Regards,

 -- 
 CYa,
   ⡍⠁⠗⠊⠕ | Debian Developer URL:http://debian.org/
   .''`. | Get my public key via finger mlang/k...@db.debian.org
  : :' : | 1024D/7FC1A0854909BCCDBE6C102DDFFC022A6B113E44
  `. `'
`-  URL:http://delysid.org/  URL:http://www.staff.tugraz.at/mlang/
 
 
 
Jean-Philippe MENGUAL





signature.asc
Description: Ceci est une partie de message	numériquement signée


Bug#680648: brltty: A new accent problem

2012-07-07 Thread Jean-Philippe MENGUAL
Package: brltty
Version: 4.4-2
Severity: normal

Dear Maintainer,

I experience a new accents problem. I don't understand as I remember we did
the conversion upstream.


*** Please consider answering these questions, where appropriate ***

   * What led up to the situation? I use brltty running orca on gdm3.

   * What exactly did you do (or not do) that was effective (or
 ineffective)? I use utf8 and fr_FR.ttb

   * What was the outcome of this action? L'??cran n'est pas en mode texte

   * What outcome did you expect instead? L'écran n'est pas en mode texte


*** End of the template - remove these lines ***

Thanks for your answer.

Best regards,


-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 3.2.0-2-686-pae (SMP w/1 CPU core)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages brltty depends on:
ii  libbrlapi0.5  4.4-2
ii  libc6 2.13-33
ii  libgpm2   1.20.4-6
ii  libicu48  4.8.1.1-8
ii  libncursesw5  5.9-9
ii  libtinfo5 5.9-9
ii  lsb-base  4.1+Debian7

Versions of packages brltty recommends:
ii  python  2.7.3~rc2-1

Versions of packages brltty suggests:
pn  brltty-speechd   none
ii  brltty-x11   4.4-2
pn  console-braille  none

-- Configuration Files:
/etc/brltty.conf changed:
braille-driver  eu  # EuroBraille
braille-device  /dev/ttyS0  # First serial device.
text-table  fr_FR   # French (France)
braille-parameters eu:protocol=clio
key-table   keypad  # bindings for keypad-based navigation

/etc/default/brltty changed:
ARGUMENTS=-q -l error
START_IN_INITRAMFS=false


-- no debconf information



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#680648: brltty: A new accent problem

2012-07-07 Thread Samuel Thibault
Jean-Philippe MENGUAL, le Sat 07 Jul 2012 16:04:06 +0200, a écrit :
 I experience a new accents problem. I don't understand as I remember we did
 the conversion upstream.

Yes, the conversion is OK, I believe it's another matter.

* What led up to the situation? I use brltty running orca on gdm3.
 
* What was the outcome of this action? L'??cran n'est pas en mode texte

It seems that the message returned by the screen driver when the screen
is not readable does not get properly decoded by the core. Dave?

AIUI, that bug only affects this particular message, it shouldn't hurt
other parts of brltty (preference menu, screen reading, etc.)

Samuel



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#680648: [BRLTTY] Bug#680648: brltty: A new accent problem

2012-07-07 Thread Samuel Thibault
Dave Mielke, le Sat 07 Jul 2012 13:54:18 -0400, a écrit :
 [quoted lines by Samuel Thibault on 2012/07/07 at 14:04 -0300]
 
 Jean-Philippe MENGUAL, le Sat 07 Jul 2012 16:04:06 +0200, a écrit :
 * What led up to the situation? I use brltty running orca on gdm3.
  
 * What was the outcome of this action? L'??cran n'est pas en mode 
  texte
 
 As it appears to me, the message is being translated correctly except for one 
 letter - the é. Is that correct?

Yes, most probably because it is non-ascii.

 If yes, do we know what it's being translated to?

é 

 I've checked, and the translation looks correct within the fr.po file.
 
msgid screen not in text mode
msgstr L'écran n'est pas en mode texte

Agreed, that's what I meant.

 It seems that the message returned by the screen driver when the screen
 is not readable does not get properly decoded by the core. Dave?
 
 The code looks correct to me. The screen driver already calls gettext(), so 
 the 
 message as rturned by the screen driver is already translated. Then it gets 
 translated into wchars via brltty's convertTextToWchars(), which is mapped to 
 mbstowcs().

Except that the end result is not correct for some reason.

Samuel



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#680648: [BRLTTY] Bug#680648: brltty: A new accent problem

2012-07-07 Thread Dave Mielke
[quoted lines by Samuel Thibault on 2012/07/07 at 14:04 -0300]

Jean-Philippe MENGUAL, le Sat 07 Jul 2012 16:04:06 +0200, a écrit :
* What led up to the situation? I use brltty running orca on gdm3.
 
* What was the outcome of this action? L'??cran n'est pas en mode texte

As it appears to me, the message is being translated correctly except for one 
letter - the é. Is that correct? If yes, do we know what it's being translated 
to? If no, can the precise problem be explained more clearly?

I've checked, and the translation looks correct within the fr.po file.

   msgid screen not in text mode
   msgstr L'écran n'est pas en mode texte

It seems that the message returned by the screen driver when the screen
is not readable does not get properly decoded by the core. Dave?

The code looks correct to me. The screen driver already calls gettext(), so the 
message as rturned by the screen driver is already translated. Then it gets 
translated into wchars via brltty's convertTextToWchars(), which is mapped to 
mbstowcs().

-- 
Dave Mielke   | 2213 Fox Crescent | The Bible is the very Word of God.
Phone: 1-613-726-0014 | Ottawa, Ontario   | 2011 May 21 is the End of Salvation.
EMail: d...@mielke.cc | Canada  K2A 1H7   | http://Mielke.cc/now.html
http://FamilyRadio.com/   | http://Mielke.cc/bible/



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#680648: [BRLTTY] Bug#680648: brltty: A new accent problem

2012-07-07 Thread Dave Mielke
[quoted lines by Samuel Thibault on 2012/07/07 at 15:10 -0300]

 If yes, do we know what it's being translated to?

é 

That's what it's supposed to be. I guess I should've asked if we know what it's 
being mistranslated to?

 The code looks correct to me. The screen driver already calls gettext(), so 
 the 
 message as rturned by the screen driver is already translated. Then it gets 
 translated into wchars via brltty's convertTextToWchars(), which is mapped 
 to 
 mbstowcs().

Except that the end result is not correct for some reason.

Is there a problem if the .po file specifies:

   Content-Type: text/plain; charset=UTF-8\n

but the user isn't using a UTF-8 locale?

In other words, I'm theorizing that our translations are stored - and returned 
- in UTF-8, but mbstowcs() is using the locally-specified system encoding.

-- 
Dave Mielke   | 2213 Fox Crescent | The Bible is the very Word of God.
Phone: 1-613-726-0014 | Ottawa, Ontario   | 2011 May 21 is the End of Salvation.
EMail: d...@mielke.cc | Canada  K2A 1H7   | http://Mielke.cc/now.html
http://FamilyRadio.com/   | http://Mielke.cc/bible/



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org