c# - String.Trim() removes more than need? -


i found ticket in our issue tracker 1 of customers report bug 1 texts incomplete! have text conversion program 1 legacy system(ibm as400) modern one. tracked , found unknown behavior on code!!

first see this: bug-full state

as see, there 2 char before first space (char32), when remove trim(),the result is:

bug-free state

yes, trim() removes char160 beginning! happened trim() works more need? note: both pictures captured in same test state.

160 nbsp (non-breaking space) , according documentation, trim remove whitespace. 160 classified in unicode whitespace.

you might want call trim(' ') instead.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -