This forum has been archived. All content is frozen. Please use KDE Discuss instead.

KTouch: how to create lessons with special characters?

Tags: None
(comma "," separated)
richelbilderbeek
Registered Member
Posts
1
Karma
0
I am working on a lesson for C++ programmers. In C++ characters like '<', '>' are common, so I want to add them to the lesson. This will interfere with the .xml file structure, so I expect there is an escape sequence for this. I checked the code of KTouch, but I could use someone pointing me to the right file/class.

Which is the source file (or class) where KTouch handles special characters in the lesson XML files?

If this is not implemented, I'd be happy to contribute by adding it myself.
sebasgo
Registered Member
Posts
6
Karma
0
KTouch has no code to deal with special characters in XML because there is no need for it.

XML has a clear-defined way of embedding special characters which clash with the characters XML uses for its structures, e.g. '<' or '>': XML Entities.

Use '&lt;' instead of '<' and '&gt;' instead of '>'.

You can also use Unicode code points as entity to express virtually every possible character in XML. For instance &#xdca9; for a pile of poo. Unfortunately, most keyboard layouts lack a key for that character. Usage within KTouch lessons should be avoided.


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Evergrowing, Google [Bot], rblackwell