| Issue 1066: | JRE emulation library - String class - charAt method | |
| 2 people starred this issue and may be notified of changes. | Back to list |
Sign in to add a comment
|
Found in GWT Release: 1.3 (and previous) Detailed description: charAt method of String class in the JRE emulation library behaves as codePointAt method from the standard JDK (for a number of reasons linked to javascript) Since this brings confusion and difficulties, why not remove the charAt method from the GWT emulation library and replace it with codePointAt to be consistent? Workaround if you have one: none Links to the relevant GWT Developer Forum posts: |
||||||||||||||||
,
Jun 06, 2007
(No comment was entered for this change.)
Cc: gwt.team.scottb
Labels: -Type-Defect Type-Enhancement Category-JRE |
|||||||||||||||||
,
Mar 10, 2008
I am not sure why you say it behaves like codePointAt -- JS still only has 16-bit characters and uses surrogate pairs to represent non-BMP characters, just like Java. I have a patch to add support for the various codePoint routines in Character and String, but they are definitely different functionality than charAt(). So, I am taking this issue as a request for adding codePoint* -- if you think there is still some other difference then please post here.
Status: Started
Owner: gwt.team.jat Labels: Milestone-1_5_RC |
|||||||||||||||||
,
Mar 11, 2008
Is there a compelling reason to support codePoint stuff for 1.5? |
|||||||||||||||||
,
Mar 11, 2008
Is there a reason not to? The code is pretty straightfoward and already written (which took about an hour), and without it there is no way of supporting non-BMP characters in GWT. Asian languages in particularly make use of non-BMP characters, so it seems we have a rather incomplete story if we leave it out. Since part of the 1.5 push was to pick up 1.5 JRE additions, it seems like this needs to be there. Leaving it out only encourages developer to assume all characters are one char which will break when their user types in a non-BMP character. Granted, we are still missing classification tables for non-ASCII characters (isLetter/etc, toLowerCase/etc), which is why I did not add the codePoint versions of those. I don't think that should go in 1.5 because it will take a lot more work to craft the classification tables in such a way as to avoid bloating the generated JS. |
|||||||||||||||||
,
Mar 11, 2008
Sure, that's totally fine, just didn't want this to take cycles from higher-priority stuff. |
|||||||||||||||||
,
Mar 20, 2008
Committed in r2185.
Status: FixedNotReleased
Labels: ReviewBy-spoon |
|||||||||||||||||
|
,
Apr 28, 2008
Owner: jat
|
|||||||||||||||||
|
,
Apr 29, 2008
|
|||||||||||||||||
|
,
Apr 29, 2008
Cc: -gwt.team.scottb sco...@google.com
|
|||||||||||||||||
,
Aug 13, 2008
1_5_RC has been released.
Status: Fixed
|
|||||||||||||||||
| ► Sign in to add a comment | |||||||||||||||||