Bug 24387 - convert_from_ucs()
Summary: convert_from_ucs()
Status: RESOLVED FIXED
Alias: None
Product: APR
Classification: Unclassified
Component: APR-iconv (show other bugs)
Version: 0.9.4
Hardware: All All
: P3 normal (vote)
Target Milestone: ---
Assignee: Apache Portable Runtime bugs mailinglist
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2003-11-04 14:20 UTC by Kohn Emil Dan
Modified: 2006-11-10 11:48 UTC (History)
0 users



Attachments
convert_from_ucs() bugfix (459 bytes, patch)
2003-11-04 14:21 UTC, Kohn Emil Dan
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kohn Emil Dan 2003-11-04 14:20:14 UTC
There is a problem in the current implementation of apr_iconv() when converting 
from ucs-2. The problem is located in the

convert_from_ucs

function from the 

apr-iconv-0.9.4/ces/iso-10646-ucs-2.c

file. The problem is that this function will prepend the 0xFE,0xFF prefix to 
the output buffer if the current state is not zero, while the intent was 
exactly the opposite. This causes the output to be garbled.

I will attach a patch which fixes the problem.
Comment 1 Kohn Emil Dan 2003-11-04 14:21:35 UTC
Created attachment 8911 [details]
convert_from_ucs() bugfix
Comment 2 Jeff Trawick 2003-11-21 18:29:06 UTC
making APR patch easily findable
Comment 3 William A. Rowe Jr. 2005-12-10 23:20:57 UTC
This looks correct, here, so voting it up.  Other eyeballs?
Comment 4 William A. Rowe Jr. 2006-02-07 22:39:38 UTC
  Tag correct component; planning to commit this shortly seeing no objections.
Comment 5 William A. Rowe Jr. 2006-09-19 19:54:35 UTC
Mass reassign the 44 open apr-bugs to apr bug list
Comment 6 William A. Rowe Jr. 2006-11-10 11:48:20 UTC
I agree, there is has been no disagreement, fixed for a future apr 0.9/1.x
release.  Thank you for the patch!