By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,902 Members | 1,552 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,902 IT Pros & Developers. It's quick & easy.

importing accented DOS chars

P: n/a
Hi there. I'm trying to import DOS characters with foreign accents (grave,
acute, circumflex, etc) into Text fields in a table in Access97 but Access
seems to be converting them along the way. eg. an E with an accent acute
somehow gets imported as a comma. How can I get Access to leave the chars
alone?

Thanks,
Jon

--
remove "bug" from address to reply
Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On Tue, 23 Dec 2003 10:01:43 -0800 in comp.databases.ms-access, "Jon
Weston" <jo*******@bugspheradatasystems.ca> wrote:
Hi there. I'm trying to import DOS characters with foreign accents (grave,
acute, circumflex, etc) into Text fields in a table in Access97 but Access
seems to be converting them along the way. eg. an E with an accent acute
somehow gets imported as a comma. How can I get Access to leave the chars
alone?


Uee the Advanced button in the import wizard, select appropriate code
page there.

--
A)bort, R)etry, I)nfluence with large hammer.
Nov 12 '05 #2

P: n/a
This is a great solution for Access >= 2000, but it will not work for prior
versions, which only support the default ANSI and OEM code pages. To solve
for Access 97, you must

1) Set the default system locale so that the CP_ACP or CP_OEMCP matches the
code page you want, and then

2) Choose the apprioriate item (ANSI/OEM) in a spec and do the import.
--
MichKa [MS]
NLS Collation/Locale/Keyboard Development
Globalization Infrastructure and Font Technologies

This posting is provided "AS IS" with
no warranties, and confers no rights.

--
MichKa [MS]
NLS Collation/Locale/Keyboard Development
Globalization Infrastructure and Font Technologies

This posting is provided "AS IS" with
no warranties, and confers no rights.
"Trevor Best" <bouncer@localhost> wrote in message
news:4r********************************@4ax.com...
On Tue, 23 Dec 2003 10:01:43 -0800 in comp.databases.ms-access, "Jon
Weston" <jo*******@bugspheradatasystems.ca> wrote:
Hi there. I'm trying to import DOS characters with foreign accents (grave,acute, circumflex, etc) into Text fields in a table in Access97 but Accessseems to be converting them along the way. eg. an E with an accent acute
somehow gets imported as a comma. How can I get Access to leave the charsalone?


Uee the Advanced button in the import wizard, select appropriate code
page there.

--
A)bort, R)etry, I)nfluence with large hammer.

Nov 12 '05 #3

P: n/a
This is not a very good solution, unforunately. Because VBA will convert the
OEM string via the ANSI code page when you pass that first param. Ick!
--
MichKa [MS]
NLS Collation/Locale/Keyboard Development
Globalization Infrastructure and Font Technologies

This posting is provided "AS IS" with
no warranties, and confers no rights.
"Chuck Grimsby" <c.*******@worldnet.att.net.invalid> wrote in message
news:6s********************************@4ax.com...

You need to use the OemToChar API call to convert the DOS characters
to Windows characters:

Declare Function OemToChar _
Lib "user32" _
Alias "OemToCharA" _
(ByVal lpszSrc As String, _
ByVal lpszDst As String) _
As Long

Public Function ConvertToWindowsText( _
ByVal strIn As String) _
As String
Dim strResult As String
strResult = String(Len(strIn), Chr$(0)) 'Create a buffer
OemToChar strIn, strResult
ConvertToWindowsText = strResult
End Function
On Tue, 23 Dec 2003 10:01:43 -0800, "Jon Weston"
<jo*******@bugspheradatasystems.ca> wrote:
Hi there. I'm trying to import DOS characters with foreign accents (grave,acute, circumflex, etc) into Text fields in a table in Access97 but Accessseems to be converting them along the way. eg. an E with an accent acute
somehow gets imported as a comma. How can I get Access to leave the charsalone?

--
Overdrawn? But I Still Have Checks Left!

Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.