Does somone knows some functions that replaces special chars like ? ? ? to it HTML special chars like á ?
Thanks.

Mailing lists / lazarus / 2012-09
4 messages · 3 people · –
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Does somone knows some functions that replaces special chars like ? ? ? to it HTML special chars like á ?
Thanks.
William Oliveira Ferreira wroteDoes somone knows some functions that replaces special chars like ? ? ? to it HTML special chars like á ?
Yes, have a look in the tiOPF v2 repository on Source Forge (www.tiopf.com). Then in the Options/tiXML.pas unit. Take a look at the TtiXMLReservedCharsTranslator class. It can do the conversion in both directions. It already has some mapping characters setup for use with XML, CSV, TAB and MS-XML files, but you can easily extended that. The XML mapping is probably what you want, or can be adapter for HTML. I've cut and pasted that code and used it outside tiOPF without problems - so no need for a tiOPF dependency.
Regards,
- Graeme -
Thanks for the hint, Graeme, I'll take a better look on it...
2012/9/8 Graeme Geldenhuys
Does somone knows some functions that replaces special chars like ? ? ? to it HTML…
William Oliveira Ferreira wroteDoes somone knows some functions that replaces special chars like ? ? ? to it HTML special chars like á ?
If we (as seemingly planned in a Delphi XE compatible way) are going to have differently encoded strings (such as UTF-8, UTF-16, UTF-32, ANSI-Code xxxx, etc), I think it would be very appropriate to also have a string type (static type and/or dynamically defined) that provides this (and more types for even more) encoding Scheme in a compatible way (with the appropriate auto-conversion if applicable).
But of course this is more am issue to be discussed over in the fpc-devel list.
-Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120910/9c85eb85/attachment.html>