problem to save german umlaute

Ruslan Zasukhin ruslan_zasukhin at valentina-db.com
Tue Nov 10 09:16:43 CST 2009


On 11/10/09 5:04 PM, "Tonigs, Nils" <ntonigs at ukaachen.de> wrote:

> Hi Ruslan,
> 
> a new approach to save german umlaute with DIR11.5, V4MD 4.3 and Valentina
> Office Server 4.2:
> 
> this lingoscript (from a test-movie) save some textstrings from textmembers to
> a db. The field-type is set to VarChar[2044] and string[2044].
> 
> ...
> on AddSomeRecords( inDB )
> 
>   tempTextMember1 = _movie.newMember( #text )
>   tempTextMember1.font = "Arial Unicode MS *"
>   tempTextMember1.text = "Diese Häcke in Übergröße"
> 
>   tempTextMember2 = _movie.newMember( #text )
>   tempTextMember2.font = "Arial Unicode MS *"
>   tempTextMember2.text = "Höhren fällt schwer."
> 
>   tempTextMember3 = _movie.newMember( #text )
>   tempTextMember3.font = "Arial Unicode MS *"
>   tempTextMember3.html = "Tästtäckst 3"
> 
>   tblBinaryData = inDB.table("binaryData")
> 
>   tblBinaryData.lastRecord()
        ^^^^^^^^^^^^^ THERE IS NO NEED in this line!
        VTable.AddRecord() add record into any empty space inside of db

Better have here:

    tblBinaryData.SetBlank();

>   tblBinaryData.field( "mediaTitle" ).value = "ätest1ö"
>   fldPict = tblBinaryData.field("binary_media")
>   fldPict.setBlank()
            ^^^^^^^^ and this SetBlank() is not needed because above we have
one
>   fldPict.setMedia(member("test1",1))
>   tblBinaryData.field( "filename_orig" ).value = tempTextMember1.html
>   newRec = tblBinaryData.addRecord()
> 
>   tblBinaryData.nextRecord()
            ^^^^^^^^^^^^^^^^^^ and this line is not needed!
Instead again

    tblBinaryData.SetBlank()

>   sjhdkjshd = [ member(26).html ] -- textmember with content "Wäärthers üchte!
> "
>   tblBinaryData.field( "mediaTitle" ).value = sjhdkjshd[ 1 ]
>   --tblBinaryData.field( "mediaTitle" ).setString( "ätest2ö" )
>   fldPict = tblBinaryData.field("binary_media")
>   fldPict.setBlank()
                ^^^^^^^^^^ remove line
>   fldPict.setMedia(member("test2",1))
>   tblBinaryData.field( "filename_orig" ).value = "Höäü ÜÖÄ !!??ßß[]" --
> tempTextMember2.html
>   tblBinaryData.addRecord()
> 
>   tblBinaryData.nextRecord()
        ^^^^^^^^^^ the same -- replace on SetBlank
        

>   tblBinaryData.field( "mediaTitle" ).value = tempTextMember3.html
>   fldPict = tblBinaryData.field("binary_media")
>   fldPict.setBlank()
>   fldPict.setMedia(member("test3",1))
>   tblBinaryData.field( "filename_orig" ).value = tempTextMember3.html
>   tblBinaryData.addRecord()
> 
> end
> ...

-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list