аЯрЁБс>ўџ 68ўџџџ5џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџьЅС9 јПфbjbj§Я§Я.(ŸЅŸЅф џџџџџџlДДДДДДДШШШШШ дШ_8єL@@@@@@@орррррр$— ЗZД@@@@@@ДД@@@@@@Д@Д@о@@о@z@КДДК@ш @Y3w†УШШ@КК$/0_К@К@ШШДДДДйVisual FoxPro Toolkit for .NET CPConvert() Method Converts a string in one CodePage to another. This method receives three parameters; a string which is to be converted, the current code page number and the new code page number.  [Visual Basic] Public Shared Function CPConvert(ByVal nCurrentCodePage As Integer, ByVal nNewCodePage As Integer, ByVal cExpression As String) As String [C#] public static string CPConvert(int nCurrentCodePage, int nNewCodePage, string cExpression) Example [Visual Basic] This example converts the string from Windows CP to Mac CP Dim lcString1 As String = "Kфmфl" Dim lcString2 As String lcString2 = CPConvert(1252, 10000, lcString1) 'Returns "K?m?l" Console.WriteLine(lcString2) Console.WriteLine(lcString1) [C#] string MyString = "ффф"; VFPToolkit.others.CPConvert(1252, 10000, MyString); //Converts the string from Windows CP to Mac CP Implementation [Visual Basic] Public Shared Function CPConvert(ByVal nCurrentCodePage As Integer, ByVal nNewCodePage As Integer, ByVal cExpression As String) As String Dim i As Integer = 0 Dim nLength As Integer = cExpression.Length 'Create a current and new array of bytes with the length of the string Dim aCurr() As Byte = New Byte(nLength) {} Dim aNew() As Byte = New Byte(nLength) {} 'Fill the current array from the string For i = 0 To cExpression.Length - 1 Step i + 1 aCurr(i) = Convert.ToByte(cExpression.Chars(i)) Next 'Get the encoding objects for the current and new Code Pages Dim CurCP As Encoding = Encoding.GetEncoding(nCurrentCodePage) Dim NewCP As Encoding = Encoding.GetEncoding(nNewCodePage) 'Fill the new array after converting current code page to new code page aNew = Encoding.Convert(CurCP, NewCP, aCurr) 'We still have bytes so we convert each byte to a char and add it to a string builder Dim sb As StringBuilder = New StringBuilder() For i = 0 To cExpression.Length - 1 Step i + 1 sb.Append(Convert.ToChar(aNew(i))) Next 'Return a string back Return sb.ToString() End Function [C#] public static string CPConvert(int nCurrentCodePage, int nNewCodePage, string cExpression) { int i=0; int nLength = cExpression.Length; //Create a current and new array of bytes with the length of the string byte[] aCurr = new byte[nLength]; byte[] aNew = new byte[nLength]; //Fill the current array from the string for (i=0; i< cExpression.Length; i++) { aCurr[i] = Convert.ToByte(cExpression[i]); } //Get the encoding objects for the current and new Code Pages Encoding CurCP = Encoding.GetEncoding(nCurrentCodePage); Encoding NewCP = Encoding.GetEncoding(nNewCodePage); //Fill the new array after converting current code page to new code page aNew = Encoding.Convert(CurCP, NewCP, aCurr); //We still have bytes so we convert each byte to a char and add it to a string builder StringBuilder sb = new StringBuilder(); for (i=0; i< cExpression.Length; i++) { sb.Append(Convert.ToChar(aNew[i])); } //Return a string back return sb.ToString(); } Requirements Namespace:  HYPERLINK "default.htm" VFPToolkit Class:  HYPERLINK "vfptoolkitnetcommonclasstopic.htm" VFPToolkit.common Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows .NET Server family Assembly: VFPToolkit (in VFPToolkitNET.dll) See Also  HYPERLINK "vfptoolkitnetcommonmemberstopic.htm" VFPToolkit.common Members |  HYPERLINK "default.htm" VFPToolkit Namespace  !"щъьћ†‹чяўяєs‚‘( - 67ABCJKz{ŒŽ™,6ab“”­ЎБВЫЬрсуфћюћющћрћнйнйћннћннћбрћрЪрћбрћрЪрћбћбћрћрЪрћрћрЪрћ 0JOJQJ5OJQJ\5\0JjOJQJUCJaJB*OJPJQJ^JphOJQJ6!"5щыьћ†‹чяў9[stДљљАЎЌЌЃЁЁЁЁŸЁЁЁЁЁЁЄЄ[$\$H$$If–ж0тџЋ€"€"і6жџџжџџжџџжџџ3ж4жaі$IfфўДбюяє qs‚‘( - CŽ,Xaуф§§§§§§§ћ§§§§ћђђђђћђ№ЄЄ[$\$,1hА‚. АЦA!А‰"А‰#‰$n%ААФАФ ФœDdшєp#<№P № 3 №€€€Пџ3"ё”•П((№€ i<@ёџ< StandardCJ_HaJmHsHtHl`l мberschrift 1ЄdЄd@&[$\$+5B*CJ0KH$OJPJQJ\^JaJ0ph``B` мberschrift 4ЄdЄd@&[$\$5B*OJPJQJ\^JphBA@ђџЁB Absatz-Standardschriftarte`ђ HTML Vorformatiert7 Ц2”(М Pфx  4 Ш#\'№*„.2Ќ5@9!B*CJOJPJQJ^JaJphX^`X Standard (Web)ЄdЄd[$\$B*OJPJQJ^JphўoЂ lang.U`Ђ!. Hyperlink >*B*phџф (џџџџфДфф 6 A J z Œ a “ ­ Б Ы р ф XtџŒXtџŒXtџŒXtџŒџџ Ruth A. Mohr,C:\Eigene Dateien\Hilfe\Common\CPConvert.doc!"ц –џ@€у у Иšdу у ф P@џџUnknownџџџџџџџџџџџџG‡:џTimes New Roman5€Symbol3& ‡:џArial7& ‡ŸVerdanaI&€ џџџџџџџщ?џ?Arial Unicode MS"0ˆ№ФЉ/ыy&/ыy&t !№‰‰ДД02ƒQ№џџ Ruth A. Mohr Ruth A. Mohr  Titelи 8@ _PID_HLINKSфAk2  default.htm`,$vfptoolkitnetcommonmemberstopic.htm K"vfptoolkitnetcommonclasstopic.htmk2 default.htmўџ еЭеœ.“—+,љЎDеЭеœ.“—+,љЎ,ш hp|„Œ” œЄЌД М Щфlэ  Titelи 8@ _PID_HLINKSфAk2  default.htm`,$vfptoolkitnetcommonmemberstopic.htm K"vfptoolkitnetcommonclasstopic.htmk2 default.htm ўџџџўџџџ !"#$ўџџџ&ўџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ§џџџ7ўџџџўџџџ:%џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџRoot Entryџџџџџџџџ РFРр{ќˆУ9@Data џџџџџџџџџџџџ1TableџџџџџџџџWordDocumentџџџџ.(SummaryInformation(џџџџџџџџџџџџXDocumentSummaryInformation8џџџџџџџџ ,CompObjџџџџjObjectPoolџџџџџџџџџџџџ@Y3w†У@Y3w†Уўџџџ ўџџџ ўџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџўџ џџџџ РFMicrosoft Word-Dokument MSWordDocWord.Document.8є9Вqўџ р…ŸђљOhЋ‘+'Гй0(˜  DЌИЬ ф№  $,4<Pф Normal.dotr Ruth A. Mohro2thMicrosoft Word 9.0@jЃw†У@jЃw†Уt ДConverts a string in one CodePage to another. This method receives three parameters; a string which is to be converted, the current code page number and the new code page number. CPConvert() Methodўџ еЭеœ.“—+,љЎDеЭеœ.“—+,љЎT €ˆ”œЄЌ ДМФЬ д ффэ