- Jun
- 1,092
- 48
Here is a simplified example of a problem I am having.
I have a file, test.txt, that contains text with some special characters. This is what the file looks like in the TCEDIT editor.
When I operate on that file with various commands and functions, the special characters change. Here are some examples.
On the other hand, I just found that the following works.
So, I cannot type the file itself, but I can copy it to tmp9: and type it from there. I cannot extract the text from the file using the %@line function, but I can extract the line from tmp9:. That does explain why a script that was working fine when I copied the data into a tmp device and worked on it from there and stopped working when I loaded the data directly from the file.
I imagine that this has something to do with UTF-8 and UTF-16. Perhaps someone can explain it to me so that I have some control over the issue.
I have a file, test.txt, that contains text with some special characters. This is what the file looks like in the TCEDIT editor.
When I operate on that file with various commands and functions, the special characters change. Here are some examples.
Code:
>type test.txt
GΘnΘalogie Fundaci≤n
Code:
>echo %@line[test.txt,0]
GΘnΘalogie Fundaci≤n
On the other hand, I just found that the following works.
Code:
>copy test.txt tmp9: & type tmp9:
C:\Users\Jay\test.txt => tmp9:
1 file copied
Généalogie Fundación
>echo %@line[tmp9:,0]
Généalogie Fundación
So, I cannot type the file itself, but I can copy it to tmp9: and type it from there. I cannot extract the text from the file using the %@line function, but I can extract the line from tmp9:. That does explain why a script that was working fine when I copied the data into a tmp device and worked on it from there and stopped working when I loaded the data directly from the file.
I imagine that this has something to do with UTF-8 and UTF-16. Perhaps someone can explain it to me so that I have some control over the issue.