Skip to main content
Participating Frequently
July 7, 2009
Question

non breaking spaces

  • July 7, 2009
  • 1 reply
  • 3699 views

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 has been closed for replies.

1 reply

Participant
July 7, 2009

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.

horixonAuthor
Participating Frequently
July 7, 2009

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.

horixonAuthor
Participating Frequently
July 7, 2009

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.