Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Correct codepage 1251 inside Web Services
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Web Services
Divers
Thread ID:
00778077
Message ID:
00783302
Vues:
19
Sergey
I would perform 2 tests in order to try to work around this.
First, what happens if you create an empty cursor with the same structure as your cursor. If every time you CREATE CURSOR you have correct Russian codepage, then try to CREATE CURSOR somecursor, then XMLTOCURSOR to YourCursor, then in "somecursor" run APPEND FROM YourCursor.
Does this fix your problem? If not, the second method is quite more as a 'hammer': you can always keep the structure of the cursor in some temp. table in your server, and instead of a cursor, use COPY TO SomeTable as 1251. The only problem with this is that you create a table, and you'll have to deal with creating unique names all the time and erasing them after use.

HTH
Jaime

>Hi Jaime
>Here it is typical procedure (inside web service) - I have to send information at my server from remote workstation:
>
>
>  PROCEDURE up01(adup) AS XMLString
>  m.lnrecs=XMLTOCURSOR(adup,"n1",0)
>  IF m.lnrecs>0
>    SELECT n1
>    yui=CPDBF( )
>    IF yui=1251 && Sometimes here codepage correct! Sometimes no...
>      UPDATE \\myweb\a.DBF SET a20.nb=n1.nb, ... ;
>      WHERE a20.ucd=n1.ucd
>      RETURN(yui)
>    ELSE
>      RETURN(yui)
>    ENDIF
>    USE
>  ENDIF
>ENDPROC
>
>
>or add some records at the server from remote computer
>
>
>...
>    IF yui=1251 &&
>      COPY ALL TO ARRAY gaTemp01
>      DELETE FROM  \\myweb\a21.DBF WHERE ucd=m.lnlink
>      INSERT INTO  \\myweb\a21.DBF FROM ARRAY gaTemp01
>      RETURN(yui)
>    ELSE
>      RETURN(yui)
>    ENDIF
>...
>
>
>The problem is - cursor (after XMLTOCURSOR) has 1252 codepage and I cannot correctly transform it into Russian codepae (inspite of income XML file has correct 1251 codepage), so I cannot update data - characters will have incorrect view... But sometimes it works correctly. May be it is a bug? But I do not know what to do. I have started project and sometimes only re-loading IIS gives me escape (my stuff get nervous and me too) ...
>
>
>>Sergey
>>Can you explain what does your Web Service do? If you do the select statement, then run cursortoxml, just do not use cursortoxml. Just run the select statement, and do a SCAN...ENDSCAN on the cursor, manually adding nodes to the xml object. Is this what you need?
>>Jaime
>>
>>>Dear Pablo Roca,
>>>
>>>Thank you very much for your answer.
>>>How could you manage with Spanish language and webservice?
>>>I have a big problem with Russian language inside webservice.
>>>When I try do use SELECT inside webservice it build cursor with codepage 1252 from 866 istead of 1251 (Russian native page). But SOMETIMES it works correct.
>>>I did all, that people from UT suggested me
>>>- I have native language for W2K server - Russian
>>>- I did try use function SYS(3005,1041) and SYS(3006,1041)
>>>- CPCURRENT()=1252 (but sometimes 1251)
>>>- CPCURRENT(2)=866 ...
>>>
>>>May be that is a BUG? And I cannot manage with this situation? I could not find anybody in Russia, who use webservices...
>>>
>>>>
>>>>>Have you ever try Webservices? Did they work with Spanish language correctly?
>>>>
>>>>Yes to both.
Why do programs stop working correctly as soon as you leave the Fox?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform