Search found 117 matches
- Jan 20, 2019 22:55
- Forum: Beginners
- Topic: Getting the true unicode code
- Replies: 21
- Views: 4163
Re: Getting the true unicode code
Finally, I understand what you mean! Thank you very much, dodicat!
- Jan 20, 2019 9:41
- Forum: Beginners
- Topic: Getting the true unicode code
- Replies: 21
- Views: 4163
Re: Getting the true unicode code
I guess that's a given, yeah.Josep Roca wrote:Save the file as utf-16 and you will get a correct code.
But, how can I explain to myself that your elegant but simple solution (or another one) was not presented at that time???
- Jan 20, 2019 8:45
- Forum: Beginners
- Topic: Getting the true unicode code
- Replies: 21
- Views: 4163
Re: Getting the true unicode code
Wouldn't this be an answer to this old question? Is the code correct? Based on a hint by Josep Roca (https://www.freebasic.net/forum/viewtopic.php?f=2&t=27357#p257395). #Include once "windows.bi" Declare Function unicd(ch As WString) As Integer Dim As Integer va = unicd("€") ...
- Jan 19, 2019 1:26
- Forum: Beginners
- Topic: A new Unicode & Newbie problem
- Replies: 16
- Views: 2540
Re: A new Unicode & Newbie problem
Wow...wow...wow!!! What magic wand is this now?! And it really works!!! And you, Josep, are the magician! Thank you very much!!! (Btw: What a strange dynamic this thread had! At first everything was unclear and it seemed that there was no solution. But then, by my naive questioning (and by my small...
- Jan 18, 2019 15:55
- Forum: Beginners
- Topic: A new Unicode & Newbie problem
- Replies: 16
- Views: 2540
Re: A new Unicode & Newbie problem
But no, Josep, this must be so! I see now that cont received by LoadFile() from TextIn.txt is a string of bytes where two bytes represent a Unicode encoded character. As I said, Print namx displays correctly "Сергeй", and I see now that e.g. mid(namx, 6, 1) results correctly in "й&quo...
- Jan 18, 2019 12:01
- Forum: Beginners
- Topic: A new Unicode & Newbie problem
- Replies: 16
- Views: 2540
Re: A new Unicode & Newbie problem
I understand. But I was thinking that by using LoadFile() it is clear that (even when file is a text file) I get exactly this, a string of bytes. So that was a misconception? Sorry!
- Jan 18, 2019 11:29
- Forum: Beginners
- Topic: A new Unicode & Newbie problem
- Replies: 16
- Views: 2540
Re: A new Unicode & Newbie problem
It is not advisable to use a unicode string to store binary data. I understand. ...you have to replace the bytes used by "Sergej" with bytes that represent "Сергeй". Exactly. I actually thought that I had expressed exactly this as my problem and my question. I am experimenting w...
- Jan 18, 2019 10:22
- Forum: Beginners
- Topic: A new Unicode & Newbie problem
- Replies: 16
- Views: 2540
Re: A new Unicode & Newbie problem
I understand. But maybe in the end I will be forced to completely change my code to your solution...
- Jan 18, 2019 9:49
- Forum: Beginners
- Topic: A new Unicode & Newbie problem
- Replies: 16
- Views: 2540
Re: A new Unicode & Newbie problem
Thank you, Josep! Before I rush to convert all my code to the functions you suggested (which in itself would be an enormous challenge for me!), I'd rather ask again: In my real code I do not read a simple text file TextIn.txt (as shown in demo), but a file that contains binary data and also a Unicod...
- Jan 18, 2019 7:27
- Forum: Beginners
- Topic: A new Unicode & Newbie problem
- Replies: 16
- Views: 2540
Re: A new Unicode & Newbie problem
Thank you, Munair. To satisfy your terminological requirements: "Unicode string" in this (or my) case (e.g. when it comes to saving texts in Windows Notepad) means a string of characters encoded in UTF-16LE. Is this correct enough, at least for interpreting my problem and my question? Back...
- Jan 17, 2019 21:54
- Forum: Beginners
- Topic: A new Unicode & Newbie problem
- Replies: 16
- Views: 2540
Re: A new Unicode & Newbie problem
. Either my question is too trivial...or so difficult that even the friendly gurus here, who have helped me so often, can't help me this time!!?? If I see this correctly, I would first need a conversion of "Сергeй" (namx) to a Unicode string. This seems to be a problem in FB. For example, ...
- Jan 17, 2019 10:12
- Forum: Beginners
- Topic: A new Unicode & Newbie problem
- Replies: 16
- Views: 2540
A new Unicode & Newbie problem
... I just can't deal with all this Unicode stuff that's so complicated in FB... I hope the following ad-hoc demo code describes my problem understandably enough (if there are bugs, please ignore them). Thank you very much in advance for your tips. ' (Edited!) ' NOTE: This code should be saved as Un...
- Jan 01, 2019 13:01
- Forum: Beginners
- Topic: A crazy timing problem
- Replies: 4
- Views: 1030
Re: A crazy timing problem
All right, enough of the criticism on the subject of an executable demo code, I get it ;-) ;-) ;-) I also explained why that's not possible for me in this case, as well as that an executable demo would not help in this case, because the problem was occuring rarely and was not predictable or reproduc...
- Jan 01, 2019 9:04
- Forum: Beginners
- Topic: A crazy timing problem
- Replies: 4
- Views: 1030
Re: A crazy timing problem
Thank you very much, Joshy, for your comment and your helpful tip. Although you say 'no one can help me', your answer is a real help already!!! A working example (even if I would be able to reduce my complete code to something like this) wouldn't help in this case because the behavior of the program...
- Dec 31, 2018 20:58
- Forum: Beginners
- Topic: A crazy timing problem
- Replies: 4
- Views: 1030
A crazy timing problem
It must be a timing problem, but I am unable to understand it... The following is a simplified code snippet which shows where the problem occurs. It belongs to a larger code which can't be reduced to a simple demo to show the problem explicitely, but the structure of the code is simple: A file is re...