Page 1 of 2
How do I import a text file in Hebrew?
Posted: Sun May 08, 2022 5:01 pm
by liveCode
I try to import a text file in Hebrew but everything uses
This is the code I put:
Code: Select all
on mouseUp
answer file "" with type ("text files|txt|tTXT" & return)
if the result = "cancel"
then exit mouseUp
else
put it into theFilePath
put URL ("file:" & theFilePath) into fld "word"
end if
end mouseUp
But Hebrew is becoming an unfamiliar language
It becomes something like this:

- ללא שם.png (4.9 KiB) Viewed 8256 times
Re: How do I import a text file in Hebrew?
Posted: Sun May 08, 2022 5:03 pm
by richmond62
Try using RTFtext.
Re: How do I import a text file in Hebrew?
Posted: Sun May 08, 2022 5:05 pm
by liveCode
What it means?
How do I use it?
Re: How do I import a text file in Hebrew?
Posted: Sun May 08, 2022 5:17 pm
by richmond62
-
-
RTF = Rich Text Format
I wrote my simple Hebrew statement in LibreOffice and saved it is RTF format.
Re: How do I import a text file in Hebrew?
Posted: Sun May 08, 2022 5:18 pm
by richmond62
I mentioned RTF as a possibility in an earlier posting on the same
topic.
Re: How do I import a text file in Hebrew?
Posted: Sun May 08, 2022 5:29 pm
by liveCode
But I want to import TXT files only and not RTF
Re: How do I import a text file in Hebrew?
Posted: Sun May 08, 2022 5:35 pm
by richmond62
Code: Select all
on mouseUp
put empty into fld "ff"
wait 10 ticks
answer file "Choose a TXT file to import"
if the result = "cancel" then
exit mouseUp
else
set the text of fld "ff" to URL ("file:" & it)
end if
end mouseUp
-
-
No obvious problems round here.
Nothing OBVIOUSLY wrong with your script either.
I think you should check the format of the file you want to import carefully.
Re: How do I import a text file in Hebrew?
Posted: Sun May 08, 2022 5:41 pm
by liveCode
It does not work
And the type of file is plain text
Re: How do I import a text file in Hebrew?
Posted: Sun May 08, 2022 5:45 pm
by richmond62
Maybe that's something to do with Windows.
All my work is using MacOS.
Is it possible for you to send me the file in ZIP format?
Re: How do I import a text file in Hebrew?
Posted: Sun May 08, 2022 5:47 pm
by liveCode
Re: How do I import a text file in Hebrew?
Posted: Sun May 08, 2022 5:49 pm
by richmond62
That's your LiveCode stack.
Can you send me your TXT document?
Re: How do I import a text file in Hebrew?
Posted: Sun May 08, 2022 5:53 pm
by liveCode
Re: How do I import a text file in Hebrew?
Posted: Sun May 08, 2022 5:57 pm
by richmond62
-
בעיה גדולה
-
-
I wonder if you are using a Unicode compliant Hebrew font.
HOWEVER: that is NOT the TXT file you posted a picture of in your
original posting.
Re: How do I import a text file in Hebrew?
Posted: Sun May 08, 2022 6:00 pm
by Klaus
We have already been there, see the second script of my posting here:
https://forums.livecode.com/viewtopic.p ... 69#p214906

Re: How do I import a text file in Hebrew?
Posted: Sun May 08, 2022 6:02 pm
by richmond62
Spot-On,
Klaus.
At least 2 people weren't paying attention, and 1 of them was me.
Though I'd be interested to know why I was having no problem with my Hebrew document.