LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
liveCode
- Posts: 124
- Joined: Sun Oct 17, 2021 5:53 pm
Post
by liveCode » Sun May 08, 2022 5:01 pm
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 8252 times
-
richmond62
- Livecode Opensource Backer

- Posts: 10078
- Joined: Fri Feb 19, 2010 10:17 am
Post
by richmond62 » Sun May 08, 2022 5:03 pm
Try using RTFtext.
-
liveCode
- Posts: 124
- Joined: Sun Oct 17, 2021 5:53 pm
Post
by liveCode » Sun May 08, 2022 5:05 pm
What it means?
How do I use it?
-
richmond62
- Livecode Opensource Backer

- Posts: 10078
- Joined: Fri Feb 19, 2010 10:17 am
Post
by richmond62 » Sun May 08, 2022 5:17 pm
-
-
RTF = Rich Text Format
I wrote my simple Hebrew statement in LibreOffice and saved it is RTF format.
-
Attachments
-
- IVRIT.livecode.zip
- Stack.
- (1009 Bytes) Downloaded 150 times
-
richmond62
- Livecode Opensource Backer

- Posts: 10078
- Joined: Fri Feb 19, 2010 10:17 am
Post
by richmond62 » Sun May 08, 2022 5:18 pm
I mentioned RTF as a possibility in an earlier posting on the same
topic.
-
Attachments
-
- Scot.rtf.zip
- This is my RTF document.
- (1.21 KiB) Downloaded 162 times
-
liveCode
- Posts: 124
- Joined: Sun Oct 17, 2021 5:53 pm
Post
by liveCode » Sun May 08, 2022 5:29 pm
But I want to import TXT files only and not RTF
-
richmond62
- Livecode Opensource Backer

- Posts: 10078
- Joined: Fri Feb 19, 2010 10:17 am
Post
by richmond62 » Sun May 08, 2022 5:35 pm
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.
-
liveCode
- Posts: 124
- Joined: Sun Oct 17, 2021 5:53 pm
Post
by liveCode » Sun May 08, 2022 5:41 pm
It does not work
And the type of file is plain text
-
richmond62
- Livecode Opensource Backer

- Posts: 10078
- Joined: Fri Feb 19, 2010 10:17 am
Post
by richmond62 » Sun May 08, 2022 5:45 pm
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?
-
richmond62
- Livecode Opensource Backer

- Posts: 10078
- Joined: Fri Feb 19, 2010 10:17 am
Post
by richmond62 » Sun May 08, 2022 5:49 pm
That's your LiveCode stack.
Can you send me your TXT document?
-
richmond62
- Livecode Opensource Backer

- Posts: 10078
- Joined: Fri Feb 19, 2010 10:17 am
Post
by richmond62 » Sun May 08, 2022 5:57 pm
-
בעיה גדולה
-
-
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.
-
richmond62
- Livecode Opensource Backer

- Posts: 10078
- Joined: Fri Feb 19, 2010 10:17 am
Post
by richmond62 » Sun May 08, 2022 6:02 pm
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.
Last edited by
richmond62 on Sun May 08, 2022 6:08 pm, edited 1 time in total.