OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

windows character set codepage string

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
jaango123
General User
General User


Joined: 12 Apr 2012
Posts: 12

PostPosted: Tue May 29, 2012 7:29 pm    Post subject: windows character set codepage string Reply with quote

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
View user's profile Send private message
B Marcelly
Super User
Super User


Joined: 12 May 2004
Posts: 1453
Location: France

PostPosted: Wed May 30, 2012 2:07 am    Post subject: Reply with quote

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 / Apache OpenOffice 4.0.1 / LibreOffice 4.1.0
MS-Windows 7 Home SP1
This forum is spammed, use instead Apache OpenOffice forums
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group