| View previous topic :: View next topic |
| Author |
Message |
jaango123 General User

Joined: 12 Apr 2012 Posts: 12
|
Posted: Tue May 29, 2012 7:29 pm Post subject: windows character set codepage string |
|
|
Hi,
In vb.net the below code, will assign the former windows chaecter set codepage 1252 bytes, to the variable , text. That will use the hex value. How can we get the same in open office basic macro
| Code: |
Dim bytes = New Byte() { &H88 }
Dim text = System.Text.Encoding.GetEncoding(1252).GetString(bytes)
|
|
|
| Back to top |
|
 |
B Marcelly Super User

Joined: 12 May 2004 Posts: 1414 Location: France
|
Posted: Wed May 30, 2012 2:07 am Post subject: |
|
|
Hello,
OpenOffice Basic uses strings of Unicode (16bits) characters. Because it is not associated with a particular Operating System.
So you have to find the Unicode value for your character and use OpenOffice Basic language.
Example:
| Code: | Dim v As String
v = chr(&H03A8) ' greek letter Psi
MsgBox(v)
|
_________________ Bernard
OpenOffice.org 1.1.5 fr / OpenOffice.org 3.4.1 en-US + langpacks, MS-Windows XP Home SP3
This forum is unusable, use instead Apache OpenOffice forums |
|
| Back to top |
|
 |
|