Why native2ascii is embedding \ufeff  in start of properties file

Hi,
I am new in java internationalization world and I got astonished that it is not possible to use non-ANSI encoded property files. Any how, I tried to use native2ansi utility to convert UTF8 encoded property file to ANSI using this command:
native2ascii -encoding UTF-8 MessageBundle-UTF8.properties MessageBundle_en_US.propertiesIn response I got an ANSI encode file with this text:
\ufeffTitle = Window Title
Now after setting the locale to English US, I tried to access it using this java code:
Locale sysLocale = Locale.getDefault();
ResourceBundle messages = ResourceBundle.getBundle("MessageBundle",sysLocale);
System.out.println(messages.getString("Title"));
This code throws an exception "Can't find resource for bundle java.util.PropertyResourceBundle, key Title" when it tries to execute messages.getString("Title");
However, if I remove \ufeff from the start of my text in properties file, the code works fine. \ufeff was not added in the original UTF8 file and was generated by native2ascii.
Can you guys plz tell me, what is wrong.
Thanks
Saqib

What you are seeing is the BOM (byte order mark), and if you are seeing it in the result file from native2ascii, then the BOM was definitely also there in the original file (the reason you are seeing it now is that native2ascii inserted the \u notation in front of it). So native2ascii did not generate anything.
Try looking at your source file in a hex editor, then you will see the BOM.
You probably saved your file in Notepad or another application that automatically inserts a BOM in UTF-8 files. Use a proper editor to save your files (one that does not insert a BOM), and you won't have the problem.

Similar Messages

  • Why does my itunes crash after start up with an "APPCRASH" error every time i open it?! I have been trying to fix this for weeks but all i can do it re-install it every other day which does nothing!

    Why does my itunes crash after start up with an "APPCRASH" error every time i open it?! I have been trying to fix this for weeks but all i can do it re-install it every other day which does nothing! I am desperate to get access to my itunes to get music on my phone and all of this just makes me want me to sell my iphone since there is no other way to add music to my phone. If things go get sorted soon you can say goodbye to my support.

    For general advice see Troubleshooting issues with iTunes for Windows updates.
    The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down the page in case one of them applies.
    The further information area has direct links to the current and recent builds in case you have problems downloading, need to revert to an older version or want to try the iTunes for Windows (64-bit - for older video cards) release as a workaround for installation or performance issues, or compatibility with QuickTime or third party software.
    Your library should be unaffected by these steps but there are also links to backup and recovery advice should it be needed.
    tt2

  • Why does a new run once start up program run every time I start my computer? The start up program is coming from Reader XI. The only name on it is a number starting with 141_______.

    Why does a new run once start up program run every time I start my computer? The start up program is coming from Reader XI. The only name on it is a number starting with 141_______.

    See also https://forums.adobe.com/thread/1654402

  • Why does the video stop and start using airplay on Mountain Lion?

    Why does the picture stop and start using airplay on Mountain Lion? I'm playing a film from a website and uising airplay to iTV. The sound is fine, but the picture stops and starts. Any ideas?

    Why does the picture stop and start using airplay on Mountain Lion? I'm playing a film from a website and uising airplay to iTV. The sound is fine, but the picture stops and starts. Any ideas?

  • HT201412 My camera light is staying on any ideas why this is as its just started to happen

    My camera light is staying on any ideas why this is as its just started to happen and I have no idea what's happened or how to switch it off

    That also indicates a hardware issue with the power and/or home buttons.
    You need to bring the phone to an Apple store and have them check it out.
    ~Lyssa

  • I want to know why display core dump when arch starts!

    I want to know why display core dump when arch starts!
    2008. 06 iso!
    u can see display coredump in starting......

    GAH, you silly people!
    Now I'm going to have to go off and write a program that selects a random string from a file to show on startup!
    (I'll probably fill the file with all the Arch snapshot names)
    EDIT: I should mention that you're silly because you managed to get me following a random compulsion.
    EDIT AGAIN: Done! I now get a random snapshot name in that spot whenever my system boots. I can post the script if anyone wants it, it's three lines.
    EDIT ONE LAST TIME: Oh wait, three lines and a extra file full of snapshot names.
    Last edited by arew264 (2008-07-19 02:35:05)

  • Why does Adobe Download assistant cannot start downloading?

    why does Adobe Download assistant cannot start downloading?

    That is likely due to your software firewall not allowing access.  Do you receive any specific error messages?  Which operating system are you using?

  • Why won't OS X Mavericks start downloading when I click the download button? It thinks and acts like it starts downloading with the thinking circle moving then stops and goes away. I have tried going to the purchases in the app store and restarting it the

    Why won't OS X Mavericks start downloading when I click the download button? It thinks and acts like it starts downloading with the thinking circle moving then stops and goes away. I have tried going to the purchases in the app store and restarting it there and that is not working either.

    Repair permissions, restart your computer & try again. 

  • Why does window media player auto starts in firefox browser

    why does window media play auto starts in firefox browser
    == This happened ==
    Every time Firefox opened
    == I put a code in for a radio station on the net i listen to on my site

    Your More system details list show the WMP plugin (np-mswmp), so that should be working.
    See:
    * http://kb.mozillazine.org/Testing_plugins
    * http://www.vdat.com/techsupport/windowstest.asp

  • HT1386 why the sync session failed to start with my iphone

    Why the sync session failed to start with my iphone

    i did this step. but still it says syncing failed... am having iphone 5 updated to 6.1.4 & itunes is updated to 11.0.4.. pls help!!

  • Why did my iPad Mini screen start glitching out of no where?!

    Why did my iPad Mini screen start glitching out of no where?! Hard reset did not fix issue... Which I could barely see the display at it was.. Please help..

    Has the unit EVER been jailbroke?  Has it EVER been dropped?  Did it EVER get excessively wet?  Did you EVER load a pirated developer's version of the IOS?
    If "No" to all the above, first try a system reset.  It cures many ills and it's quick, easy and harmless...
    Hold down the on/off switch and the Home button simultaneously until you see the Apple logo.  Ignore the "Slide to power off" text if it appears.  You will not lose any apps, data, music, movies, settings, etc.
    If the Reset doesn't work, try a Restore.  Note that it's nowhere near as quick as a Reset.  It could take well over an hour!  Connect via cable to the computer that you use for sync.  From iTunes, select the iPad/iPod and then select the Summary tab.  Follow the on-screen directions for Restore and be sure to say "yes" to the backup.  You will be warned that all data (apps, music, movies, etc.) will be erased but, as the Restore finishes, you will be asked if you wish the contents of the backup to be copied to the iPad/iPod.  Again, say "yes."
    At the end of the basic Restore, you will be asked if you wish to sync the iPad/iPod.  As before, say "yes."  Note that that sync selection will disappear and the Restore will end if you do not respond within a reasonable time.  If that happens, only the apps that are part of the IOS will appear on your device.  Corrective action is simple -  choose manual "Sync" from the bottom right of iTunes.
    If you're unable to do the Restore, go into Recovery Mode per the instructions here.  You WILL lose all of your data (game scores, etc,) but, for the most part, you can redownload apps and music without being charged again.  Also, if you have IOS-7, read this.

  • Why the fifa 2014 apps suddenly started and after some seconds stopped "the window of the game minimized to the desktop toolbar

    Hello to you
    I have download game apps fifa 2014 from the app store of windows 8.1 32x  on my laptop.
     However, the game started to the mane screen and stopped suddenly.
     The window of the game minimized to the manager toolbar on desktop and win I click on it the game work from the beginning and stopped like the first time and didn't work  
    Why the fifa 2014 apps suddenly started and after some seconds stopped "the window of the game minimized to the desktop toolbar  
       System Information Report
    عام        
                    نظام التشغيل        Microsoft Windows 8.1 Pro
                    المعالج المركزي        Intel(R) Core(TM) i3-2330M CPU @ 2.20GHz
                    اسم المستخدم        amjad
    العرض        
                    وصلة الفيديو        Intel(R) HD Graphics 3000
                    ذاكرة الفيديو        1.15 GB
                    دقة الشاشة        1366 x 768
    التخزين        
                    إجمالي الذاكرة        2.67 GB
                    الذاكرة الحرة        1.05 GB
                    مساحة القرص الصلب        296.54 GB
                    المساحة الحرة        176.65 GB
    I/O        
                    الفأرة        Samsung PS/2 Port Input Device
                    لوحة المفاتيح        Standard PS/2 Keyboard
    نظام الكمبيوتر        
                    اسم الكمبيوتر        SUMSUNG-I3
                    اسم المستخدم        [email protected]
                    المنظمة        N/A
    نظام التشغيل        
                    اسم نظام التشغيل        Microsoft Windows 8.1 Pro
                    إصدار نظام التشغيل        6.3.9600
                    معرّف المنتج        00261-50000-00000-AA602
                    وقت تشغيل النظام        17/06/2014 23:34:21
                    إصدار الأنترنت إكسبلورر        11.0.9600.17126
                    DirectX إصدار        DirectX 11
                    OpenGL إصدار        6.3.9600.16384 (winblue_rtm.130821-1623)
    الريجستري        
                    أقصى حجم        682 MB
                    الحجم الحالي        104 MB
                    الحالة        OK
    المعالج المركزي        
                    اسم المعالج        Intel(R) Core(TM) i3-2330M CPU @ 2.20GHz
                    اسم الكود        N/A
                    المنتج        GenuineIntel
                    السرعة الحالية        2200 Mhz
                    أقصى سرعة        2200 Mhz
                    Voltage        1.2V
                    الساعة الخارجية        100 Mhz
                    الرقم التسلسل        BFEBFBFF000206A7
                    معرّف المعالج        x64 Family 6 Model 42 Stepping 7
                    مأخذ التوصيل        CPU
                    L1-Cache        64 KB
                    L2-Cache        256 KB
                    L3-Cache        3072 KB
    اللوحة الأم        
                    الطراز        300E4A/300E5A/300E7A
                    المنتج        SAMSUNG ELECTRONICS CO., LTD.
                    الرقم التسلسل        123490EN400015
                    BIOS اسم        Phoenix SecureCore-Tiano(tm) NB Version 2.1 01QA
                    BIOS منتج        Phoenix Technologies Ltd.
                    SMBIOS إصدار        01QA
                    BIOS تاريخ        05/09/2011
    BIOS ميزات        
                    PCI is supported        نعم
                    BIOS is Upgradable (Flash)        نعم
                    BIOS shadowing is allowed        نعم
                    Boot from CD is supported        نعم
                    Selectable Boot is supported        نعم
                    EDD (Enhanced Disk Drive) Specification is supported        نعم
                    Int 5h, Print Screen Service is supported        نعم
                    Int 9h, 8042 Keyboard services are supported        نعم
                    Int 14h, Serial Services are supported        نعم
                    Int 17h, printer services are supported        نعم
                    Int 10h, CGA/Mono Video Services are supported        نعم
                    NEC PC-98        نعم
                    ACPI supported        نعم
                    USB Legacy is supported        نعم
    مورد الذاكرة        
                    إجمالي الذاكرة        2.67 GB
                    الذاكرة المستخدمة        1.62 GB
                    الذاكرة الحرة        1.05 GB
                    استخدام الذاكرة        60%
    الذاكرة الفعلية        
                    صرف الذاكرة        BANK 0
                    الوصف        Physical Memory 0
                    محدد الجهاز        ChannelA-DIMM0
                    المساحة        2.00 GB
                    السرعة        1333 Mhz
                    المنتج        Hynix/Hyundai
                    عرض البيانات        64 bit
                    نوع الذاكرة        Unknown
                    عامل النموذج        SODIMM
    الذاكرة الفعلية        
                    صرف الذاكرة        BANK 2
                    الوصف        Physical Memory 2
                    محدد الجهاز        ChannelB-DIMM0
                    المساحة        2.00 GB
                    السرعة        1333 Mhz
                    المنتج        Hynix/Hyundai
                    عرض البيانات        64 bit
                    نوع الذاكرة        Unknown
                    عامل النموذج        SODIMM
    الأقراص الصلبة        
                    الاسم        SAMSUNG HM321HI
                    نوع الوسائط        Fixed hard disk media
                    الحجم الكلي        298.09 GB
                    نوع الواجهة        IDE
                    عدد الأقراص        3
                    إجمالي الأسطوانات        38913
                    إجمالي الكليّة        255
                    إجمالي القطاعات        625137345
                    مجموع المسارات        9922815
                    المسارات لكل اسطوانة        255
                    بايت لكل قطاع        512
                    قطاعات لكل مسار        63
                    S.M.A.R.T دعم        نعم
                    درجة الحرارة الحالية        0C (32F)
    CD-ROM Drive        
                    الاسم        TSSTcorp CDDVDW SN-208BB
                    القرص        E:
                    معدل النقل        -1
                    الحالة        OK
    IDE تحكم        
                    الاسم        Standard SATA AHCI Controller
                    المنتج        Standard SATA AHCI Controller
                    الحالة        OK
    وصلة الفيديو        
                    الاسم        Intel(R) HD Graphics 3000
                    معالج فيديو        Intel(R) HD Graphics Family
                    المنتج        Intel Corporation
                    فيديو فن العمارة        VGA
                    DAC نوع        Internal
                    حجم الذاكرة        1.15 GB
                    نوع الذاكرة        Unknown
                    وضع الفيديو        1366 x 768 x 4294967296 colors
                    معدل التحديث الحالي        60 Hz
                    إصدار التعريف        9.17.10.3347
                    سجل الأحداث        29/01/2014
    جهاز العرض        
                    الاسم        Generic PnP Monitor
                    ارتفاع الشاشة        768
                    عرض الشاشة        1366
                    الحالة        OK
    Ethernet        
                    اسم المنتج        Realtek PCIe GBE Family Controller
                    اسم الخدمة        RTL8168
                    المنتج        Realtek
                    MAC عنوان        NULL
    Wi-Fi        
                    اسم المنتج        Intel(R) Centrino(R) Wireless-N 130
                    اسم الخدمة        NETwNs32
                    المنتج        Intel Corporation
                    MAC عنوان        DC:A9:71:7A:A9:3B
    Local Area Connection        
                    اسم المنتج        TAP-Windows Adapter V9
                    اسم الخدمة        tap0901
                    المنتج        TAP-Windows Provider V9
                    MAC عنوان        NULL
    أجهزة الصوت        
                    الاسم        صوت الشاشة من Intel(R)‎‎‎
                    المنتج        Intel(R) Corporation
                    الحالة        OK
    الفأرة        
                    الاسم        Samsung PS/2 Port Input Device
                    المنتج        ELAN
                    الأزرار        0
                    الحالة        OK
    لوحة المفاتيح        
                    الاسم        Standard PS/2 Keyboard
                    الوصف        Enhanced (101- or 102-key)
                    وظائف المفاتيح        12
                    الحالة        OK
    USB أداة تحكم        
                    اسم المنتج        Intel(R) 6 Series/C200 Series Chipset Family USB Enhanced Host Controller - 1C2D
                    المنتج        Intel
                    بروتوكول معتمد        Universal Serial Bus
                    الحالة        OK
    USB أداة تحكم        
                    اسم المنتج        Intel(R) 6 Series/C200 Series Chipset Family USB Enhanced Host Controller - 1C26
                    المنتج        Intel
                    بروتوكول معتمد        Universal Serial Bus
                    الحالة        OK

    http://apps.microsoft.com/windows/en-us/app/fifa-14/e89c9ccf-de94-45ed-9cd4-7e11d05c3da4
    System requirements
    OS: Windows 8
    CPU:  1.8G core2duo
    RAM: 1G
    GPU: NVidia card 7800 GT+ with 512M+ vram
    This game is not fully optimized to work with some ATI GPU cards.
    Keyboard support is not available.
    try to contact game manufactured, maybe your GPU doesn't meet requirement

  • Why have my yahoo emails suddenly started to fail to open yet the timer icon keeps spinning?

    Why have my yahoo emails suddenly started to fail to open? Up until last week, no problems, now they appearing the inbox, but, I can't open to read them, yet the timer icon continues to spin!

    Hi jeanmcdiarmid,
    Thanks for visiting Apple Support Communities.
    See this article for some troubleshooting steps that you can try on an iOS device or Mac:
    iOS: Unable to send or receive email
    http://support.apple.com/kb/ts3899
    OS X Mail: Troubleshooting sending and receiving email messages
    http://support.apple.com/kb/TS3276
    All the best,
    Jeremy

  • My e-mail has quit updating.  Anybody know why or how to get it started back?  The result is that I dont get my e-mails on the phone.

    My e-mail has quit updating. Anybody know why or how to get it started back?  The result is that I can not get e-mails on my phone.

    Thank you for the info re. the main menu. Your answer I used worked; however, the menu bar all the way across is solid black. The only way I can find out the names on the menu is to point the cursor from left to right over the black bar to find "file" "edit" tools", etc. What do I need to do to get these menu titles to be seen?
    As regarding the GMail --the menu bar used to have an envelope symbol which was white and outlined in red. That disappeared. I googled "mail.google.com" to try to get back my email. This didn't work. I then tried to get a different email address and password--after 8-19 attempts, this never worked. My other email (sbcglobal.net) has never returned. So I don't know where that went or how to get it back

  • If I click stop, why can't I simply re-start the track?

    I got to say I can't get on with the new version of iTunes. And I normally embrace change but this is not better in any way whatsoever.
    Most frustrating is when I'm playing a track, If I click stop, why can't I simply re-start the track? It doesn't comu up with an option to pause the track...
    Also, when I click on an track that sits on my desktop, why doesn't iTunes autoatically default to show the music folder and the actual track thats showing....
    Grrrrrrrrrrr....
    Neil

    iTunes does allow you to pause and restart a track as long as you don't change the source. If you do that you only get the stop option.
    If I remember correctly iTunes has always done this, you are not the first person tp find this annoying.
    If you would like to suggest improvements to iTunes, use the "Provide iTunes feedback" option on teh iTunes help menu. We are all just users here so it is unlikely that anyone from Apple will read your post.

Maybe you are looking for

  • Question regarding Digital Out (COAX) not mini plug on Audigy ZS

    Hi. I have a question regarding the Digital Out and Digital In (COAX/RCA) Inputs I have on the back of my computer and if theres an easy way to hook the digital out with only a regular Digital Coax cable to a Home Theater receiver and get 5./DTS, OR

  • Some GOOD news at last !!!!

    Hey guys...aftert all that frustration and trying to make iTunes 7.6 work and no luck I downgraded back to 7.4.3...and after downgrading I noticed a tip that I missed earlier saying to check if I have Smart Card installed...I didn't have it...and aft

  • How to handle the VISA Name Menu

    Well, I am trying to handle the interface for a VISA name control menu. The menu button is way too small for my app, and I would really like not to have to build my own from scratch. I want to show it on mouse over (a status button), then hide it whe

  • DPC_WATCHDOG_VIOLATION error on windows 8.1 X64

    hello their ! i have beeen using windows 8.1 pro X64 for the last 3-4 months and it worked fine .but from few days ago a blue screen error freezing my pc every time . thoug it shows DPC_WATCHDOG_VIOLATION sometimes but when i try to use chrome it occ

  • PC Suite, Phone Update, now Broken, Help Please

    I guess the title says it all. I posted a similar topic in another forum with no response, I guess this is the correct place for it. In a nutshell, I had PC Suite working fine. Updated the phone software with the nokia software update tool. The next