السلام عليكم

كيف انشأ وا حفظ احفظ نص string في تكست على شكل UTF-8 ENCODE
يعنى
STRING TO UTF-8

بلغة الـ PHP
هذا مثال بالـ ASP
يستخدم CALSS
------------
http://www.pstruh.cz/help/scptutl/sa305.htm

--------CODE----------
-------------
Examples

ByteArray - save unicode data (string) as utf-8 with BOM
'Save unicode string as UTF-8 with BOM

SaveBOMUTF "f:\222.txt", "ìšèøžýáíé"

Sub SaveBOMUTF(FileName, SomeString)
'1. save BOM header.
SaveBOMHeader FileName

Dim ByteArray
Set ByteArray = CreateObject("ScriptUtils.ByteArray")

'Convert the string to UTF-8
ByteArray.charset = "utf-8"
ByteArray.String = SomeString

'Save the UTF-8 string at position 4 of the file
'(after the 3bytes BOM header)
ByteArray.SaveAs FileName, 4
End Sub

Sub SaveBOMHeader(FileName)
'create byte array object
Dim ByteArray
Set ByteArray = CreateObject("ScriptUtils.ByteArray")

'the bytearray contains BOM header - 3 bytes.
ByteArray.SetSize 3
ByteArray(1) = &HEF
ByteArray(2) = &HBB
ByteArray(3) = &HBF
'Or you can use ByteArray.HexString = "EFBBBF" in v> 2.14

'Save the BOM header to the FileName
ByteArray.SaveAs FileName
End Sub





---------


---------------------