How do I import a text file in Hebrew?

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: 119
Joined: Sun Oct 17, 2021 5:53 pm

How do I import a text file in Hebrew?

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
ללא שם.png (4.9 KiB) Viewed 5142 times

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9285
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: How do I import a text file in Hebrew?

Post by richmond62 » Sun May 08, 2022 5:03 pm

Try using RTFtext.

liveCode
Posts: 119
Joined: Sun Oct 17, 2021 5:53 pm

Re: How do I import a text file in Hebrew?

Post by liveCode » Sun May 08, 2022 5:05 pm

What it means?
How do I use it?

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9285
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: How do I import a text file in Hebrew?

Post by richmond62 » Sun May 08, 2022 5:17 pm

SShot 2022-05-08 at 19.09.52.png
-
SShot 2022-05-08 at 19.14.21.png
-
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 63 times

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9285
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: How do I import a text file in Hebrew?

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 70 times

liveCode
Posts: 119
Joined: Sun Oct 17, 2021 5:53 pm

Re: How do I import a text file in Hebrew?

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
Livecode Opensource Backer
Posts: 9285
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: How do I import a text file in Hebrew?

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
-
SShot 2022-05-08 at 19.34.44.png
-
No obvious problems round here. 8)

Nothing OBVIOUSLY wrong with your script either.

I think you should check the format of the file you want to import carefully.

liveCode
Posts: 119
Joined: Sun Oct 17, 2021 5:53 pm

Re: How do I import a text file in Hebrew?

Post by liveCode » Sun May 08, 2022 5:41 pm

It does not work :cry:
And the type of file is plain text

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9285
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: How do I import a text file in Hebrew?

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?

liveCode
Posts: 119
Joined: Sun Oct 17, 2021 5:53 pm

Re: How do I import a text file in Hebrew?

Post by liveCode » Sun May 08, 2022 5:47 pm

Untitled 1.zip
(650 Bytes) Downloaded 71 times

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9285
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: How do I import a text file in Hebrew?

Post by richmond62 » Sun May 08, 2022 5:49 pm

That's your LiveCode stack.

Can you send me your TXT document?

liveCode
Posts: 119
Joined: Sun Oct 17, 2021 5:53 pm

Re: How do I import a text file in Hebrew?

Post by liveCode » Sun May 08, 2022 5:53 pm

טקסט לדוגמא.zip
(254 Bytes) Downloaded 76 times

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9285
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: How do I import a text file in Hebrew?

Post by richmond62 » Sun May 08, 2022 5:57 pm

SShot 2022-05-08 at 19.55.12.png
-
בעיה גדולה
-
SShot 2022-05-08 at 19.57.41.png
-
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.

Klaus
Posts: 13806
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: How do I import a text file in Hebrew?

Post by Klaus » Sun May 08, 2022 6:00 pm

We have already been there, see the second script of my posting here:
https://forums.livecode.com/viewtopic.p ... 69#p214906
8)

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9285
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: How do I import a text file in Hebrew?

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.

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”