From: Reini U. <ru...@x-...> - 2007-08-23 06:59:37
|
Sabri LABBENE schrieb: > Hi Reini and all, > I have some issues with not supported characters by wysiwyg charset. > What happens is that some users sometimes copy some text from other text > editors and paste it into wysiwyg edition area. The copied text can > contain some characters that are not part of ISO 8859-1 charset. When > opening a page that contains such characters with wysiwyg the text after > the unknown character is not shown. > I choosed ISO 8859-1 as a charset for wikiwyg conversion because it is > understandable by all web browsers and is a standard in web applications. > - Should we support additional charsets? We should detect/choose it (optionally) and convert it. Or tell the user to use our native charset and how to convert it. (iconv or use some sort of save as...) > - May be skip the unknown characters and continue the display? Not > really good because there is some data loosing ! > > what do you think? > Cheers, There are mostly two types of pasted formats: rtf and ansi (text/plain) in the clipboard. From notepad you get ansi (the windows version of latin1. almost the same, but different). From word, wordpad, outlook at el. you'll get rtf, with formatting. This is what the user wants usually. I have to investigate if it's possible to get the source charset from rtf to convert it automatically. If possible. I doubt it. We'd need some dropdown to choose the source charset within the editor, which converts it into the wiki charset, which is usually latin1 or utf-8. There's a libtextcat library which can detect the language and/or charset of the source automatically. I maintain it for cygwin. -- Reini Urban http://phpwiki.org/ http://murbreak.at/ http://helsinki.at/ http://spacemovie.mur.at/ |