works great in english, but gives the same errors on my hebrew data.
Apperantly hebrew is somehow diffrent, I'll try to explain what I see.
I see sentence which need to be no. 1 sometimes starting alright, but
sentence
number 2 starts after sentence number 3.
Let's say if I would've tried something like this (in hebrew):
I hate dogs. They leave out hair and barks. And also Cats. You know I hate
cats.
I would've gotten: I hate dogs. And also Cats. They leave out hair and
barks. You ...
and sometimes:
And also Cats. I hate dogs. They leave out hair and barks. You know...
Any thoughts on why this is not consistent?
Michael.
----- Original Message -----
From: "Hinojosa, Robert A" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, July 31, 2001 12:17 AM
Subject: RE: Put into Reverse
> last one... sorry.
>
> change the order of the output of the sentences array. Like this.
> Robert.
>
> <!--- Output the sentences --->
> <cfloop to="1" from="#arrayLen(sentences)#" step="-1" index="i">
> <cfoutput>#sentences[i]#</cfoutput>
> </cfloop>
>
> then that should yield.
>
> "I hate dogs. They leave out hair and barks."
>
>
> -----Original Message-----
> From: Hinojosa, Robert A [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 30, 2001 5:05 PM
> To: CF-Talk
> Subject: RE: Put into Reverse
>
>
> I might've misunderstood your first request because I thought that the
> periods at the end of the reverse request was a typo. But I think I
> understand now, only the words are reversed and not sentence
> structure(periods)? Anyway, if they are, here is that code that will
keep
> that in tact.
>
> Robert
>
> <cfset str = "skrab dna riah tuo evael yehT. sgod etah I.">
>
> <cfset sentences = arrayNew(1)>
> <cfset counter = 1>
>
> <!--- Loop through Sentences --->
> <cfloop list="#str#" index="sentence" delimiters=".">
> <cfset newStr = "">
> <!--- Reverse Sentence --->
> <cfloop to="1" from="#Len(sentence)#" step="-1" index="i">
> <cfset newStr = newStr & mid(sentence, i, 1)>
> </cfloop>
> <!--- Add the delimiter back --->
> <cfset newStr = trim(newStr) & ".">
> <!--- Add sentence to array --->
> <cfset sentences[counter] = newStr>
> <cfset counter = counter + 1 >
> </cfloop>
>
> <!--- Output the sentences --->
> <cfloop from="1" to="#arrayLen(sentences)#" index="i">
> <cfoutput>#sentences[i]#</cfoutput>
> </cfloop>
>
>
> -----Original Message-----
> From: Michael Lugassy [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 30, 2001 5:25 PM
> To: CF-Talk
> Subject: Put into Reverse
>
>
> I'm having difficulties reversing a long string that was written in
backward
> hebrew.
> which means it was first written from right to left AND opposite (dont
> ask...)
>
> something like:
> skrab dna riah tuo evael yehT. sgod etah I.
>
> I want to get this string back to it's straight form
> ("I hate dogs. They leave out hair and barks.").
>
> Reversing all the string won't help, neither will reversing each word and
> sticking it together (sentences won't be in order). I had limited success
> when
> trying to first split the sentences ("." as the delimter), but no 100%
> solution.
> I know this is doable, because Internet Explorer uses the Visual Encoding,
> which
> acts the same (on the same text).
>
> ! pleH
>
> leahciM
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists