?
Solved

How do I open a file that has Japanese characters in the filename

Posted on 2006-05-18
3
Medium Priority
?
163 Views
Last Modified: 2010-05-01
Hello,

I have an application running on English and Japanese OS. When it comes to the Japanese version, I cannot open a file, using a filename from the Microsoft CommonDialog control, I get a Bad Filename error code.

Here is the code I am using

Dim f$

CommonDialog1.ShowSave
   
f$ = CommonDialog1.filename

iunit = freefile
Open f$ for Output as #iunit

I am using VB5

Any help greatly appreciated,
Mike
0
Comment
Question by:gmike
2 Comments
 
LVL 1

Expert Comment

by:Brownhead
ID: 16739650
Could you upload an example of the chinese characters to a webhost (http://uppit.com/) so we can have an example for testing... because I've never seen Japenese file names before
0
 
LVL 5

Accepted Solution

by:
burningmace earned 1000 total points
ID: 16819155
I had a similar problem. Unfortunately, unless your system is in Japanese mode at the actual time, there's not a solution (that I know of). Usually, ASCII and Extended ASCII characters only are accepted in filenames. When you're using the Japansese language, the OS translates ASCII character values across to Japanese characters. When you switch back to English, the characters appear garbled or just as blocks. This is because the OS doesn't recognise what they are in terms of standard characters. The best thing to do would be to rename the file to something that can be read by the application.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question