Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 241179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T20:43:54+00:00 2026-05-11T20:43:54+00:00

I am displaying Japanese characters in a VB6 application with the system locale set

  • 0

I am displaying Japanese characters in a VB6 application with the system locale set to Japan and the language for non Unicode programs as Japanese. A call to GetACP() correctly returns 932 for Japanese. When I insert the Japanese strings into my controls they display as “ƒAƒtƒŠƒJ‚Ì—‰¤” rather than “アフリカの女王”. If I manually set the Font.Charset to 128 then they display correctly.

What is the best way to determine the correct Charset for a given LCID in VB6?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T20:43:54+00:00Added an answer on May 11, 2026 at 8:43 pm

    Expanding Bob’s answer, here’s some code to get the current default charset.

    Private Const LOCALE_SYSTEM_DEFAULT As Long = &H800
    Private Const LOCALE_IDEFAULTANSICODEPAGE As Long = &H1004
    Private Const TCI_SRCCODEPAGE = 2
    
    Private Type FONTSIGNATURE
        fsUsb(4) As Long
        fsCsb(2) As Long
    End Type
    
    Private Type CHARSETINFO
        ciCharset As Long
        ciACP As Long
        fs As FONTSIGNATURE
    End Type
    
    Private Declare Function GetLocaleInfo Lib "kernel32" Alias "GetLocaleInfoA" ( _
        ByVal Locale As Long, _
        ByVal LCType As Long, _
        ByVal lpLCData As String, _
        ByVal cchData As Long _
    ) As Long
    
    Private Declare Function TranslateCharsetInfo Lib "GDI32" ( _
        lpSrc As Long, _
        lpcs As CHARSETINFO, _
        ByVal dwFlags As Long _
    ) As Long
    
    Public Function GetCharset() As Long
    On Error GoTo ErrorHandler
    
        Dim outlen As Long
        Dim lCodepage As Long
        Dim outBuffer As String
        Dim cs As CHARSETINFO
    
        outBuffer = String$(10, vbNullChar)
        outlen = GetLocaleInfo(LOCALE_SYSTEM_DEFAULT, LOCALE_IDEFAULTANSICODEPAGE, outBuffer, Len(outBuffer))
    
        If outlen > 0 Then
            lCodepage = val(Left$(outBuffer, outlen - 1))
    
            If TranslateCharsetInfo(ByVal lCodepage, cs, TCI_SRCCODEPAGE) Then
                GetCharset = cs.ciCharset
            End If
        End If
    
        Exit Function
    
    ErrorHandler:
        GetCharset = 0
    End Function
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a RSS application in which title are in Japanese language. I
I have an app displaying Japanese characters but for some reason, the tilde (~)
I'm displaying a set of images as an overlay using Google Maps. Displaying these
For displaying data in our application I've use GridView with the following markup: <asp:GridView
I am manually displaying a System.Windows.Forms.Tooltip on a control using the show method, but
I'm having some issues with spanish characters displaying in an iOS app. The code
For displaying line numbers in a file, I use command: set numbers What is
Can the iPhone default system font display Japanese script? I have an iPhone which
Im displaying contact details on a screen. I need to display phone call window
Displaying Type here to ... until the user enters text into a TextBox is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.