mixed languages in a field: solved : )

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

mixed languages in a field: solved : )

Curt Ford
Hi Eric,

Thanks - playing with your Encoded Text Picker gave me a fresh sense of
what to look at.. the actual characters for the Russian were OK (they
are 'entities' encoded by Rev in a separate part of the project), but I
had forgotten to provide font tags as well. Adding "<font face" &
q(Arial) & ">" before the item, and "</font>" after the item, now has
the English displayed properly, even after some Russian.

(Just in case there's anyone here newer than I am: the q(Arial) is a
function, which I've put in the stack script, that's a shortcut to
putting quotes around a string - makes expressions like these less
messy; I'd seen it in Sarah Reichelt's XML tutorial and found it handy
for things like this.)

What was curious (& confusing) is that the source text file, created by
Rev from fields using 'put the HTMLText of field "myField"', has these
language-specific tags (<font face="Geneva CY" lang="ru") before the
Russian elements, but no such tags before the English. When I read the
information back in from the text file to display in a field, it seems
to work even with no language-specific tags for the Russian, but it
does need them for displaying English that follows Russian.  Anyway, it
all looks good now. Thanks!

best,

Curt


> Hi Curt,
>
> Before struggling with unicode, you have to build right html first:
> You set the htmlText of your field to a string which is not html but
> in fact usual text.
> For instance, tab in html is "&#9;" and "tab" in html is only a text
> string...
> In order to understand how translation can be made between html and
> usual text, you might be interested by downloading my Encoded Text
> Picker free plugin from my web-site (address below).
> It will allow you to translate any text from and to html
> automatically and then understand how to build your code properly :-)
> Take heart!
>
> Best Regards from Paris,
>
> Eric Chatonet.
Dr. Curtis Ford
Instructor of Russian and Linguistics
Dept. of Language, Literatures and Cultures
University of South Carolina
cford @ sc.edu

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: mixed languages in a field: solved : )

Eric Chatonet
Hi Curt,

Glad to help you.

To be perfectly sure about your code, you could check your html  
building precisely:
You put your html built by script (as html) in the message box.
You paste this html text in the html pane of the Encoded Text Picker,  
switch to "Usual text" and back to HTML.
Then you compare both HTMLs: they should be the same ones :-)

Le 9 juil. 05 à 13:38, Curtis Ford a écrit :

> Hi Eric,
>
> Thanks - playing with your Encoded Text Picker gave me a fresh  
> sense of what to look at.. the actual characters for the Russian  
> were OK (they are 'entities' encoded by Rev in a separate part of  
> the project), but I had forgotten to provide font tags as well.  
> Adding "<font face" & q(Arial) & ">" before the item, and "</font>"  
> after the item, now has the English displayed properly, even after  
> some Russian.
>
> (Just in case there's anyone here newer than I am: the q(Arial) is  
> a function, which I've put in the stack script, that's a shortcut  
> to putting quotes around a string - makes expressions like these  
> less messy; I'd seen it in Sarah Reichelt's XML tutorial and found  
> it handy for things like this.)
>
> What was curious (& confusing) is that the source text file,  
> created by Rev from fields using 'put the HTMLText of field  
> "myField"', has these language-specific tags (<font face="Geneva  
> CY" lang="ru") before the Russian elements, but no such tags before  
> the English. When I read the information back in from the text file  
> to display in a field, it seems to work even with no language-
> specific tags for the Russian, but it does need them for displaying  
> English that follows Russian.  Anyway, it all looks good now. Thanks!


Best Regards from Paris,

Eric Chatonet.
----------------------------------------------------------------
So Smart Software

For institutions, companies and associations
Built-to-order applications: management, multimedia, internet, etc.
Windows, Mac OS and Linux... With the French touch

Free plugins and tutorials on my website
----------------------------------------------------------------
Web site        http://www.sosmartsoftware.com/
Email        [hidden email]/
Phone        33 (0)1 43 31 77 62
Mobile        33 (0)6 20 74 50 86
----------------------------------------------------------------

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution