Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » \u0000 in strings behaviour intended?
\u0000 in strings behaviour intended? [message #529317] Fri, 23 April 2010 14:55 Go to next message
Christian is currently offline Christian
Messages: 72
Registered: July 2009
Member
Hello...

just wanted to ask if this is intended behaviour in SWT that any string
containing a null character is broken at that point and not displayed
in a swt widget (checked with Text and TableColumn, though was displayed
as empty box in StyledText as I would expect it).

regards
Christian
Re: \u0000 in strings behaviour intended? [message #529544 is a reply to message #529317] Mon, 26 April 2010 06:30 Go to previous messageGo to next message
Praveen  is currently offline Praveen
Messages: 86
Registered: July 2009
Member
Christian, I am not sure whether I understood your problem exactly. In
many cases, SWT does not accept null string due to the platform
constraints as many of the platforms does not support accepting it. For
that reason, it is valid to pass an empty string ("") instead of null
string.
Please elaborate your problem if this hasn't answered your question.
Re: \u0000 in strings behaviour intended? [message #529555 is a reply to message #529544] Mon, 26 April 2010 06:55 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 25917
Registered: July 2009
Senior Member
Christian is asking about support for non-null non-empty strings that
contains the unicode character at code point 0 (zero). Likely there are
limitations here because of platform issues as well, i.e., the null
character is often used as a string terminator...


Praveen wrote:
> Christian, I am not sure whether I understood your problem exactly. In
> many cases, SWT does not accept null string due to the platform
> constraints as many of the platforms does not support accepting it.
> For that reason, it is valid to pass an empty string ("") instead of
> null string.
> Please elaborate your problem if this hasn't answered your question.
Previous Topic:ToolBar/ToolItem background colour on TabItems
Next Topic:Disable "Close Window" button on the title bar of a dialog
Goto Forum:
  


Current Time: Thu Jul 24 00:23:45 EDT 2014

Powered by FUDForum. Page generated in 0.01859 seconds