dcsimg
Results 1 to 6 of 6
  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jul 2014
    Posts
    23

    File name in tamil language within Folder

    Hi,

    I have created one application for my client, i have done it. The project details is simply entering data in tamil lanuage in text box fields after that Once print button pressed every details which entered should automatically filling in word template and the document is saving programatically with Customer Name and Cell Number , here the problem is i am entering customer name in tamil so file name is saved in tamil, when i open output folder the name is not in tamil there showing the file name some collection of characters in english. I want to show the file name in tamil as i saved in the output folder. I am using Bamini tamil font. I attached the screenshot for your reference.

    Regards,

    Raj Mohan
    Attached Images Attached Images  

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    31,623

    Re: File name in tamil language within Folder

    It doesn't matter the font... font is just a visual representation of the data, which in this case is based on the language of the system. Given the English names of the items in the far left there, I'd say your system's language is English, that's why you're seeing the English file names rather than the Tamil file names. If you want them actually saved in Tamil, and to show in Tamil... then you would need to set the system language to Tamil...

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3
    You don't want to know.
    Join Date
    Aug 2010
    Posts
    4,580

    Re: File name in tamil language within Folder

    I would sort of expect Windows to handle this case, but can tell a sensible story about why it might not. I really hope I'm not right.

    There's always the possibility something about your "file save" code is goofy. So just for giggles, try this in a new console application:
    Code:
    Module Module1
    
        Sub Main()
            System.IO.File.WriteAllText("yourpath.txt", "test")
        End Sub
    
    End Module
    Replace "yourpath.txt" with something in Tamil, and feel free to make it a full file path. Run the program, then go check the file. If the file shows up in Tamil, something's wrong with how your other program saves files. If the file shows up garbled, we have issues.

    Computers use rules called "encodings" to define which bytes mean which symbols in text. The more or less first popular one was ASCII. It was developed when "let's save some memory" was still more important than "let's make it easy to represent all human languages". So it only uses 7 bits out of a byte. That means it can only support 128 "letters", which isn't a lot. The English alphabet and digits take up 66 of the 128 values. There are about 30 "control" characters like CR and LF. The remaining 30 or 40 characters are all punctuation marks. It turns out ASCII only supports English.

    When that became a problem, the solution was "ANSI code pages", which most people still call "ASCII" even though it's wrong. This style of encoding keeps 0-127 as the same as normal ASCII, but 128-255 can be defined as characters specific to a language. Some languages, like Chinese, have so many characters they let some of their bytes mean "also consider the next byte", so those are called "multi-byte character sets" since often characters can take 2 or 3 bytes to be represented.

    ANSI can display a lot of languages, but there are downsides. The code page in use is generally a system setting, and most code pages can only display ONE language. So if you're reading Korean text and want to open a Japanese text document, you have to jump through some hoops to reconfigure the code pages. There are no standards for text files to indicate which code page they use, so if you have a file and only know it's "ANSI encoded" it takes guesswork to find the right code page. And there's absolutely no standard way to use ANSI to put two different languages in one document, that would require a program with that feature.

    To solve THOSE issues, the Unicode standard was created. This is a list of the characters a "Unicode encoding" must support, and covers a large majority of human languages (but not quite all of them, yet.) The first really popular Unicode encoding was UTF-16. It uses 2 bytes per character and I suspect can use more, but it always uses at least two. The next really popular Unicode encoding was UTF-8. It supports the ASCII range, then uses 2 or more bytes for everything outside of ASCII. UTF-8 is more popular because it's more memory-efficient when working with English text. Unicode encodings tend to have a nice optional feature: they can place 2-4 bytes at the start of the file called a "Byte Order Mark" that isn't valid text, but tells you which encoding and byte ordering to use to read the file. If only ANSI did this!

    I said all this because it matters and can help you understand what's going wrong.

    Unicode didn't become a really well-supported thing until the mid-90s. I remember it being a big deal when Java supported Unicode.

    So Windows used ANSI text by default through 95, 98, Me, all the way up to XP. The NT line used Unicode text by default, so Windows 2000 is a good point to note "Windows supported Unicode by default after this". .NET uses UTF-16 internally but tends to use UTF-8 by default when saving text files, it never uses ASCII or ANSI unless you ask it to use them.

    That last sentence is why I said all these words: .NET always uses a Unicode encoding, so it should always support Tamil.

    But.

    You're looking at the files in Windows Explorer, and your hard drive is partitioned with some filesystem. What if:
    • ...Windows Explorer only supports ANSI?
    • ...your filesystem only supports ANSI?

    If either of those is true, you'll see the behavior you expect. Probably the most sensible possibility is "the filesystem doesn't support it". If that's true, then what you're seeing is a symptom of "You are trying to use the Tamil language but your system is configured to use a different language."

    I did some quick research, and it looks like the FAT filesystems don't have strong support for Unicode, and instead rely on the system code page to store "not English" filenames. That can lead to a lot of problems. Worse, it looks like the FAT filesystems use the "OEM" character set, which is "mostly English with a few European accented characters". It's probable Tamil isn't in the OEM character set. If this is the case, changing your system language won't fix it: FAT32 is designed mostly for English text only.

    It'd be really weird, in my opinion, if Windows Explorer only supported ANSI text, but I guess that's another possibility.

    But it sounds to me like your filesystem is the problem, and your choices are "don't save filenames in Tamil" or "don't support systems unless they are formatted with NTFS".
    This answer is wrong. You should be using TableAdapter and Dictionaries instead.

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Jul 2014
    Posts
    23

    Re: File name in tamil language within Folder

    Hi i knew it already what you have said, Is there any possibility for this? If i download any tamil videos in online, the windows explorer shows in tamil text only rathar than english. I attached screenshot for your reference.Name:  Q1.jpg
Views: 68
Size:  47.3 KB

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Jul 2014
    Posts
    23

    Re: File name in tamil language within Folder

    Thanks for your suggestion !

  6. #6
    You don't want to know.
    Join Date
    Aug 2010
    Posts
    4,580

    Re: File name in tamil language within Folder

    I'm a little stumped, but it suggests something about how you save your files messes with the text. I'd have to see the code that gets the name from the user and the code that saves the file to start making guesses.
    This answer is wrong. You should be using TableAdapter and Dictionaries instead.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width


×
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.