Mailinglist Archive: opensuse-bugs (2746 mails)

< Previous Next >
[Bug 826422] New: gettext: broken handling of unicode code point escapes in Tcl
  • From: bugzilla_noreply@xxxxxxxxxx
  • Date: Mon, 24 Jun 2013 14:29:05 +0000
  • Message-id: <bug-826422-21960@http.bugzilla.novell.com/>

https://bugzilla.novell.com/show_bug.cgi?id=826422

https://bugzilla.novell.com/show_bug.cgi?id=826422#c0


Summary: gettext: broken handling of unicode code point escapes
in Tcl
Classification: openSUSE
Product: openSUSE 12.3
Version: Final
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Basesystem
AssignedTo: bnc-team-screening@xxxxxxxxxxxxxxxxxxxxxx
ReportedBy: gber@xxxxxxxxxxxx
QAContact: qa-bugs@xxxxxxx
Found By: ---
Blocker: ---


User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:21.0) Gecko/20100101
Firefox/21.0

xgettext parsing of unicode code point escapes is broken, it tries to replace
the escape with the literal unicode character but does not consume the last
character of the escape but copies it into the output which results in corrupt
.po files, e.g.:

----8<----
$ cat gettext-bug.tcl
#!/usr/bin/tclsh

package require msgcat

puts [msgcat::mc "Hello\u200e\u201cWorld\u201d"]
$ $ /usr/bin/xgettext -o- gettext-bug.tcl
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-06-24 16:24+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@xxxxxx>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#: gettext-bug.tcl:5
msgid "Hello‎e“cWorld”d"
msgstr ""
---->8----

It should probably not try to substitute these escapes at all as it results in
fragile .po files with embedded control characters, see e.g. the U+200E
left-to-right mark in the above example.

Reproducible: Always

--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
< Previous Next >