gnustep-dev
[Top][All Lists]
Advanced

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

Simple patch for nextUTF8()


From: Stefan Bidi
Subject: Simple patch for nextUTF8()
Date: Sat, 15 Dec 2012 13:06:49 -0600

I'm having to re-do a lot of the character encoding code in CFString
and while researching what base did I noticed that the nextUTF8 could
use some optimization.  I removed the while loop there and replaced it
with the macro I will be using in CFString.

Another change I made was remove an exception towards the end of the
function.  The exception above it already covers the case where (u >=
0xfdd0 && u <= 0xfdef).  Also, a surrogate is invalid in a UTF-8
string, the "invalid unicode code point" is a more appropriate
description here.

I didn't commit patch myself since I wanted to make sure other people
here agreed with it, and that there isn't anything I'm missing.  I ran
the testsuite and everything passed.

Attachment: GSString_UTF8.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]