Weird space character

බැලීම් 34
පළමු නොකියවූ පණිවිඩය දක්වා මඟ හරින්න

Rob

නොකියවූ,
2019 ඔක් 17, 22.21.232019-10-17
සිට leo-editor
My LaTeX processor choked on 2 instances of an unknown UTF8 character. Probably came into Leo when I copied from somewhere else (perhaps an MS Word document). Anyway, there was no visual clue in Leo where the offending characters were. By process of elimination I found the offending node and copied the text into Notepad++ where I could see the characters looked different from a normal space character. Don't know if it copies correctly here, but the space between `and' and `training' isn't a normal space character.

and training

Question; is there a way to show the space characters and line feeds in Leo like I can in Notepad++?

Rob...

Edward K. Ream

නොකියවූ,
2019 ඔක් 18, 05.56.082019-10-18
සිට leo-editor
On Thu, Oct 17, 2019 at 9:21 PM Rob <lar...@gmail.com> wrote:

My LaTeX processor choked on 2 instances of an unknown UTF8 character. Probably came into Leo when I copied from somewhere else (perhaps an MS Word document).

I'm not sure there is such a thing as an "unknown" UTF8 character. 

Leo is quite careful when pasting text from a clipboard.  The relevant methods are
LeoFrame.pasteText and its two helpers, qt_gui.getTextFromClipboard and g.checkUnicode.  The latter does a thorough check of the incoming text, and warns if there are conversion errors.

It would be a serious bug in Leo if g.checkUnicode was flawed.  By default, which always applies when pasting, g.checkUnicode assumes utf-8 encoding.
Question; is there a way to show the space characters and line feeds in Leo like I can in Notepad++?

show-invisibles (and hide-invisibles & toggle-invisibles).

With the Qt gui this does:

    option.setFlags(QtGui.QTextOption.ShowTabsAndSpaces)

so, Leo is at the mercy of what Qt thinks is a space or tab.

Edward

Rob

නොකියවූ,
2019 ඔක් 18, 08.50.272019-10-18
සිට leo-editor
I re-read the error message in the LaTeX processor and perhaps I should clarify. 

Keyboard character used is undefined in inputencoding`utf8'.

Reviewing the documentation for that package (inputenc) suggests the error is because there is no corresponding glyph to map to output. So, it's really a function of the processor's inability to deal with the character.

After show-invisibles I see all the regular spaces as dots. The offending character doesn't have anything, just looks like a space, making it difficult to find (see screenshot). Not sure what, if anything can done about it.

Thanks for the suggestion to use show-invisibles. It doesn't show lie feeds, though (see screenshot from Notepad++). Don't know how important that is, though.

Rob...

191018 Leo utf8.png

191018 NP++ utf8.png



Edward K. Ream

නොකියවූ,
2019 ඔක් 18, 10.05.552019-10-18
සිට leo-editor
On Fri, Oct 18, 2019 at 7:50 AM Rob <lar...@gmail.com> wrote:
I re-read the error message in the LaTeX processor and perhaps I should clarify. 

Keyboard character used is undefined in inputencoding`utf8'.

Reviewing the documentation for that package (inputenc) suggests the error is because there is no corresponding glyph to map to output. So, it's really a function of the processor's inability to deal with the character.

I doubt there is anything that Leo can do about that.

Edward

Terry Brown

නොකියවූ,
2019 ඔක් 18, 11.03.542019-10-18
සිට Leo list
"Vanilla" LaTeX systems tend to use `pdflatex` to process things, and don't understand unicode inputs without extra fiddling.  If you use XeTeX (`xelatex`), it assumes unicode by default and makes things simpler - in a lot of cases it can be a drop in replacement.  I think TeXLive supports either, pandoc can certainly use either.

It's really bad when you go from 27 μg/L nitrate (micro-grams per liter) in your drinking water to 27 g/L because LaTeX doesn't render the μ :-S

Cheers -Terry



On Fri, Oct 18, 2019 at 7:50 AM Rob <lar...@gmail.com> wrote:
--
You received this message because you are subscribed to the Google Groups "leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/4df9f0af-3133-4a08-929c-503e887fc0a8%40googlegroups.com.

Edward K. Ream

නොකියවූ,
2019 ඔක් 18, 11.13.392019-10-18
සිට leo-editor
On Fri, Oct 18, 2019 at 10:03 AM Terry Brown <terry...@gmail.com> wrote:

"Vanilla" LaTeX systems tend to use `pdflatex` to process things, and don't understand unicode inputs without extra fiddling.  If you use XeTeX (`xelatex`), it assumes unicode by default and makes things simpler - in a lot of cases it can be a drop in replacement.  I think TeXLive supports either, pandoc can certainly use either.

Thanks, Terry, for these comments.  I didn't know any of this.
It's really bad when you go from 27 μg/L nitrate (micro-grams per liter) in your drinking water to 27 g/L because LaTeX doesn't render the μ :-S

Yikes!  Death by (lack of) unicode.

Edward
සියල්ලට පිළිතුරු දෙන්න
කර්තෘට පිළිතුරු දෙන්න
ඉදිරියට යවන්න
නව පණිවිඩ 0