Guten Tag Thorsten Schöning,
am Dienstag, 6. Oktober 2015 um 15:05 schrieben Sie:

> I'm building apr-util 1.5.4 and testxlate fails for me converting
> from UTF-7 to UTF-8. My apr-iconv is version 1.2.1 R2.

I thought it is a different error and wanted to create a new thread
for it, but now I think it has the same reason: The test for
conversion from UTF-8 to UTF-7 fails as well, because comparing
"expected" to "buf" fails. "expected" contains "Edelwei+AN8-", while
"buf" contains "Edelwei+AN8". Notice the missing "-" at the end, but
because we have the end of the string as well, this should be a valid
UTF-7 encoding.

I tested using some online service[1], converting "Edelweiß" from the
textbox in UTf-8 into UTF-7, which resulted in "Edelwei+AN8-" with
"-". But if I change the downloaded file, remove the "-" and choose
conversion from UTF-7 to UTF-8, the UTF-8 result is properly encoded
"Edelweiß" again.

If I change the UTF-7 test string in testxlate and remove the "-" at
the end, the former failing tests pass now.

So, this looks like handling a "-" as the last character in the string
while converting from UTF-7 to something is broken, because more input
is requested, while not needed. And for producing UTF-7 the test is
broken and doesn't consider that "-" is only added if needed and chars
follow the converted text, which is not the case in the test.

[1]: http://www.motobit.com/util/charset-codepage-conversion.asp

Mit freundlichen Grüßen,

Thorsten Schöning

-- 
Thorsten Schöning       E-Mail: thorsten.schoen...@am-soft.de
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon...........05151-  9468- 55
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow

Reply via email to