Re: How to determine if a text file is UTF8 ?

2024-10-29 Thread jbv via use-livecode
Thank you all for your answers, and especially Mark for posting some code that I will try immediately. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

Re: Bring a stack to front when it is already open

2024-10-29 Thread Bob Sneidar via use-livecode
Okay, that’s odd. It IS working now. Bob S > On Oct 28, 2024, at 4:45 PM, Richard Gaskin via use-livecode > wrote: > > Bob wrote: > >> This may seem simple, but for some reason it’s not working. I have a >> Views function that can open multiple windows in one click, but >> sometimes stacks

Re: How to determine if a text file is UTF8 ?

2024-10-29 Thread Mark Waddingham via use-livecode
On 2024-10-29 08:53, jbv via use-livecode wrote: Hi list, How to determine if a text file is UTF8 or just plain ASCII ? In other words, how to know if one should use open file myfile.txt for UTF8 read or open file myfile.txt for read If it is really plain ASCII then it doesn't matter - UTF

Re: How to determine if a text file is UTF8 ?

2024-10-29 Thread Bob Sneidar via use-livecode
I suppose you could also use textDecode(, “UTF-8”) to convert the text to that format. Bob S > On Oct 29, 2024, at 8:17 AM, Bob Sneidar via use-livecode > wrote: > > There is a Wikipedia article on this. Turns out it is not straightforward. > There can be a Byte Order Mark that the file b

Re: How to determine if a text file is UTF8 ?

2024-10-29 Thread Bob Sneidar via use-livecode
So open file for binary read, then put textDecode(it, “UTF-8”) into tText. Bob S > On Oct 29, 2024, at 8:31 AM, Bob Sneidar wrote: > > I suppose you could also use textDecode(, “UTF-8”) to convert the > text to that format. > > Bob S > > >> On Oct 29, 2024, at 8:17 AM, Bob Sneidar via us

Re: How to determine if a text file is UTF8 ?

2024-10-29 Thread Bob Sneidar via use-livecode
There is a Wikipedia article on this. Turns out it is not straightforward. There can be a Byte Order Mark that the file begins with but not all vendors use it. And I do not think you can make the determination simply by examining the contents of the file. Byte-order mark[edit] If the Unicode b

How to determine if a text file is UTF8 ?

2024-10-29 Thread jbv via use-livecode
Hi list, How to determine if a text file is UTF8 or just plain ASCII ? In other words, how to know if one should use open file myfile.txt for UTF8 read or open file myfile.txt for read Thank you. jbv ___ use-livecode mailing list use-livecode@list