Re: U+FFFF
Jan Wielemaker <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <[email protected]> |
On 07/29/2013 02:58 PM, � wrote: > I have a U+FFFF in my .pl file,which is coded in UTF-8. There is no error > when I consulted it in swi-prolog, where there is a error when I consulted > it in tu-prolog. As U+FFFF is not a valid Unicode code, I want to know how > swi-prolog deals with it without an error. It simply doesn't care whether the character code is valid Unicode or not. To SWI-Prolog, character sequences are basically strings of integers 0..0x10ffff (0..0xffff on Windows). It may run into trouble doing certain actions on them, in which case it might raise exceptions. Not sure what will happen here. Surely, the current Windows version is broken wrt. UTF-16 surrogate codepoints as it handles Windows wchar_t* as UCS-2 instead of UTF-16. Similar, Unicode streams are read as UCS-2. The only combination that works as I think it should for the entire Unicode range is UTF-8 I/O on non-Windows platforms. It is not high on my priority list to fix this. This probably has to wait until someone comes along willing to spend time to fix it or providing money to get it fixed. Cheers --- Jan > -------------- next part -------------- > HTML attachment scrubbed and removed > _______________________________________________ > SWI-Prolog mailing list > [email protected] > https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog > _______________________________________________ SWI-Prolog mailing list [email protected] https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog