Skip to main content
Participating Frequently
Jul 7, 2009 3:30 PM UTC
Question

non breaking spaces

Im using TLF build 460 (707635).  I may be missing something but im thinking that non breaking spaces are not supported? I dont think there is a    equivilent in FXG either.

Can I have a non breaking space in a tlf SpanElement?  Something equivilant to <span>foo& nbsp ;bar</span>. Ive tried importToFlow with various argument combinations, changing source types(xml, string) and formats(FXG_FORMAT, TEXT_LAYOUT_FORMAT, HTML_FORMAT, PLAIN_TEXT_FORMAT);

I have a custom importer and exporter and a few thoughts that came to mind were using a tab element or replacing   with a space, but im trying to stay away from string.replace or regex. Aside from importing, to get the real intended functionality of a nbsp im thinking I would have to put the string with "nbsps" in its own span and do some test to make sure its on the same line.

Am i missing something and nbsp is supported?  If its not supported any recomendations to add this support?

This topic is closed to new replies. Start a new post to keep the conversation going.

4 replies

Participant
Jul 7, 2009 4:19 PM UTC

I tried typing a nonbreaking space into TLF text by pressing Option-space on the Mac. This was treated by TLF as a nonbreaking space. When I looked at the markup this generated, it put in the Unicode value for nonbreaking space (C2AO in UTF-8). I don't know how to type this on WIndows, but I hope that helps.

Translate
horixonAuthor
Participating Frequently
Jul 7, 2009 4:56 PM UTC

Thanks definetly helpful.  On windows its ALT+ 0160(use numberpad). I just tested  & #160 ;  seems to not break the string.

I guess I will need to convert & nbsp ; to its unicode equivilant.

Translate
horixonAuthor
Participating Frequently
Jul 7, 2009 6:27 PM UTC

When using importToFlow with source type as XML the & nbsp ;  seems to get translated to FFA0 numeric Unicode character code 65440.  It seems that is the case with using the XML class out side of TLF also.

Translate