Accessing Windows XP "Regional Options"

In the Windows XP control panel, I can set the "Regional Options" for my computer. For example, the currency format looks like this: "$123,456,789.00" and the time format like this: "16:10:51".
Is there an API that allows me to access these formats from within Java, and can notify me when they change?

Is there any native API such as C/C++ that we
can call and then we can in turn write our own JNI
interface to connect to it.Clearly there is, because many of the Windows programs I use every day display dates in the format I specified in the Regional Settings.
Do I know what it is? No. But this isn't the best place to look for that information. MSDN is the best place.

Similar Messages

  • Java time and windows Regional Option

    I want to return a time,so ,how is set on window's regional option.
    I set time on windows Regional Option so - 13:38:29, bat java return another format 1:38:29.
    for example. time is 13:40 PM on windows.
    Calendar date=Calendar.getInstance();
    date.get(Calendar.HOUR); this returns 1 not 13.
    What to do to return 13 not 1.

    Google (or even just the search box on this forum) is your friend:
    http://forum.java.sun.com/thread.jspa?forumID=16&threadID=318720
    http://forum.java.sun.com/thread.jspa?forumID=16&threadID=244377
    http://forum.java.sun.com/thread.jspa?forumID=16&threadID=544738
    http://forum.java.sun.com/thread.jspa?threadID=626159&messageID=9468678

  • Windows "Regional Options" locale - JCE for 8bit vs 16bit character sets

    I have a Java application that reads in an Encrypted text file. The text file was Encrypted using JCE 1.2.1 and Encrypted on a Windows system with the locale set to English(US). The Encryption uses Sun's version of the DES encryption algorithm.
    This app reads in the Encrypted text file and Decrypts it and processes it's information.
    This works fine on Windows systems if the Regional Options control panel is set to a region that uses 8bit character sets:
    - English
    - Italian
    - Spanish
    - French
    But, if the locale is set to 16bit character set regions, the text file cannot be read and parsed. Such regions include:
    - Russian
    - Greek
    - English (Hong Kong)
    At this point, I think I have two options, but I would love to hear about more:
    - Edit the Encrypting/Decrypting code (or the parsing code - parses through a comma deliminated file) so that the file that is Encrypted and Decrypted can handle either an 8bit or 16bit character sets
    (Don't know how to do this)
    or
    - Programatically change the locale of Windows machines to English(US) at application start-up and then change it back to the previous locale setting on application shut-down
    (Don't know how to do this either)
    I'd appreciate any help. I'm not sure if this is an International issue or an JCE issue.
    Thanks in advance

    I found an answer to the problem I was having.
    The culprit were two special characters that the client was using in the encrypted text to distinguish between different fields and to distinguish carriage returns (� and �). The non Latin alphabet languages didn't know what to do with those characters so they substituted there own characters, thus breaking the parsing logic which was hard coded to look for � and �.
    The problem also was related to the fact that the JCE works with byte[] arrays. FileInputStreams (which deal with byte[] arrays) seem to convert the special characters to new characters in non Lating languages to match what was going on in the JCE logic.
    The easiest fix I could come up with, was to include a new properties file to be read by a separate FileInputStream. This properties text file contained just two characters (��). When I loaded in this new properties file via a FileInputStream, the two characters (��) in the properties file magically change to match the currently active alphabet (or didn't change at all if the computer was using a Latin alphabet).
    By checking the new properties file to see what the characters had changed to (if they had), I was able to know what to use to parse the encrypted data. And as such, regardless of what language the computer was set to, the encrypted data is now parsed correctly, as I took out the hard coding that looked specifically for the characters � and � and instead rewrote the code so it now uses the characters from the properties file (or whatever characters they change to) for parsing the content data.
    I hope others find this useful.

  • Windows "Regional Options" locale (8bit vs 16bit character sets)

    I have a Java application that reads in an Encrypted text file. The text file was Encrypted using JCE 1.2.1 and Encrypted on a Windows system with the locale set to English(US). The Encryption uses Sun's version of the DES encryption algorithm.
    This app reads in the Encrypted text file and Decrypts it and processes it's information.
    This works fine on Windows systems if the Regional Options control panel is set to a region that uses 8bit character sets:
    - English
    - Italian
    - Spanish
    - French
    But, if the locale is set to 16bit character set regions, the text file cannot be read and parsed. Such regions include:
    - Russian
    - Greek
    - English (Hong Kong)
    At this point, I think I have two options, but I would love to hear about more:
    - Edit the Encrypting/Decrypting code (or the parsing code - parses through a comma deliminated file) so that the file that is Encrypted and Decrypted can handle either an 8bit or 16bit character sets
    (Don't know how to do this)
    or
    - Programatically change the locale of Windows machines to English(US) at application start-up and then change it back to the previous locale setting on application shut-down
    (Don't know how to do this either)
    I'd appreciate any help. I'm not sure if this is an International issue or an JCE issue.
    Thanks in advance

    I found an answer to the problem I was having.
    The culprit were two special characters that the client was using in the encrypted text to distinguish between different fields and to distinguish carriage returns (� and �). The non Latin alphabet languages didn't know what to do with those characters so they substituted there own characters, thus breaking the parsing logic which was hard coded to look for � and �.
    The problem also was related to the fact that the JCE works with byte[] arrays. FileInputStreams (which deal with byte[] arrays) seem to convert the special characters to new characters in non Lating languages to match what was going on in the JCE logic.
    The easiest fix I could come up with, was to include a new properties file to be read by a separate FileInputStream. This properties text file contained just two characters (��). When I loaded in this new properties file via a FileInputStream, the two characters (��) in the properties file magically change to match the currently active alphabet (or didn't change at all if the computer was using a Latin alphabet).
    By checking the new properties file to see what the characters had changed to (if they had), I was able to know what to use to parse the encrypted data. And as such, regardless of what language the computer was set to, the encrypted data is now parsed correctly, as I took out the hard coding that looked specifically for the characters � and � and instead rewrote the code so it now uses the characters from the properties file (or whatever characters they change to) for parsing the content data.
    I hope others find this useful.

  • Windows server 2008 R2 x64 Authentication failure while try to access Windows server 2003 R2

    Hello,
    I try to access Windows Server 2003 R2 Standard from Windows Server 2008 R2 x64 standard using integrated windows authentication . And because my application tries to read SQL server i'm getting and error that user is not trusted. Then I tried to open a
    simple shared folder on  2003 and none of the users is able to do it. Both servers are part of common workgroup in the same IP range. Using domain is not an option. Migrating 2003 to 2008 is not an option either. The specific DB provider I have to use
    supports only windows authentication, so creating user into SQL server is not an option too. I have tested many applications and cases which requires/uses windows authentication and non of the manage to connect.
    Any help is very welcome because things are urgent!
    Authentication failure

    That method in workgroup mode may be a problem.
    Authentication in SQL Server
    Might ask them over here.
    SQL Server forums on
    MSDN
    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]
    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

  • Z61M - Fingerprint reader disabled and now I cannot access windows

    My fingerprint reader had been causing issues, so I went into the Thinkpad menu and under "manage security options" , clicked on the fingerprint icon and then preceeded to delete what I thought was the fingerprint option/software. I mistakenly thought I would be able to use the password to access windows, however, I'm now unable to get past the CSS User ID window.  I can only access Thinkvantage by pressing the blue button when prompted but can't find anything in there to help me. The finger print reader now fails everytime and the Control/Alt/Del button only brings up the CSS User ID and when I hit "ok" it states - "User was not enrolled or his data cannot be opened". When I click options on the CSS ID window and then click "I am not enrolled and want to use my windows password", it states "unable to bypass logon because the user is enrolled" - which contradicts the first message????
    I'm really confused and the Lenovo help desk offered no assistance except to "restore to factory settings" but that means I'll lose everything - surely there is an easier solution to getting access to my laptop without a complete reset.

    I've managed to work this out myself by going into BIOS and disabling the Security chip which allowed me then to use the password to get access. From there I have now disabled the finger print reader correctly. Hopefully this helps someone else down the track!! Cheers.

  • JDK1.3: Regional Options

    Hi,
    I'm using Win2000 Prof platform for development. The Locale and Language in "Regional Options" were set to "Typical Chinese (Hong Kong)". When I use JDK1.3 to compile my Java programs, strange symbols and Chinese will be displayed if any output messages (e.g. error messages) are generated by the compiler. I would like to have English display instead of Chinese and those strange symbols, but I don't want to set the locale and language for Win2000 to English. Could anyone give your advices? Thanks in advance!
    P.S.: No such display problem when I used JDK1.2.

    I am having the same problem on my Japanese Windows 2000 professional using Java 1.4.2_01. Did you find a solution?

  • Unable to access Windows folder

    I have just installed Oracle Unbreakable Linux, I am not able to access Windows folders when I boot into Oracle Linux.
    [root@pc ~]# ls -l /mnt/win
    total 0
    My windows folders are present at /mnt/win mapped to /dev/hda1. This is shown in /etc/fstab
    /etc/fstab
    shows /dev/hda1 mapped to /mnt/win (defaults or auto,users,rw options don't work)
    [root@pc ~]# cat /etc/fstab
    # This file is edited by fstab-sync - see 'man fstab-sync' for details
    /dev/hda1 /mnt/win vfat auto,users,rw 0 0
    even tried to mount manually, but failed
    [root@pc ~]# mount -t vfat /dev/hda1 /mnt/win
    mount: /dev/hda1 already mounted or /mnt/win busy
    mount: according to mtab, /dev/hda1 is already mounted on /mnt/win
    Tried to create my own entry. Created a directory disc and tried to mount it with /dev/hda1. disc shows no files.
    [root@pc ~]# mkdir diskc
    [root@pc ~]# mount -t vfat /dev/hda1 ./diskc
    [root@pc ~]# ls -l diskc
    total 0
    Mount shows that /mnt/win is mounted on /dev/hda1
    [root@pc ~]# mount
    /dev/hda1 on /mnt/win type vfat (rw)
    Please help

    TommyReynolds:
    [root@pc ~]# fdisk -l /dev/hda
    Disk /dev/hda: 40.0 GB, 40060403712 bytes
    255 heads, 63 sectors/track, 4870 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Device Boot Start End Blocks Id System
    /dev/hda1 * 1 1275 10241406 c W95 FAT32 (LBA)
    /dev/hda2 1276 4870 28876837+ f W95 Ext'd (LBA)
    /dev/hda5 1276 2550 10241406 83 Linux
    /dev/hda6 2551 2563 104391 83 Linux
    /dev/hda7 2564 4870 18530946 83 Linux
    +++++++++++++++++++++++++
    [root@pc ~]# cat /etc/fstab
    # This file is edited by fstab-sync - see 'man fstab-sync' for details
    LABEL=/ / ext3 defaults 1 1
    LABEL=/boot /boot ext3 defaults 1 2
    none /dev/pts devpts gid=5,mode=620 0 0
    none /dev/shm tmpfs defaults 0 0
    LABEL=/home /home ext3 defaults 1 2
    /dev/hda1 /mnt/win vfat defaults 0 0
    none /proc proc defaults 0 0
    none /sys sysfs defaults 0 0
    /dev/hdc /media/cdrecorder auto pamconsole,exec,noauto,managed 0 0
    /dev/fd0 /media/floppy auto pamconsole,exec,noauto,managed 0 0

  • Help needed - Can't access OneKey Recovery restoration option after system reboot,

    Hi,
    I run OneKey Recovery, after I choose "recovery", and system reboot.....system automatically log in Windows 7 again, rather than access OneKey Recovery restoration option.
    I am using G570 and  OneKey Recovery version is 7. this issue never happened before, it always reboot to OneKey Recovery restoration before....please help. Thanks

    You shouldn't need Command + R since the Option key will present you with the Recovery boot volume. Seems something is amiss there, I'm willing to bet you may have been using a wireless keyboard.

  • Problem accessing Windows network - permission checking is inconsistent

    I am in the process of making the move at my workplace from a Windows/Solaris environment to an exclusively-Solaris workstation environment. I have wanted to do this for a while but now that Evolution is bundled in with Solaris 10 I have finally embarked down this path.
    One of things that I need to be able to do is access Windows shares on our corporate network. I am having a few issues with this using the Java Desktop system in Solaris 10. Here is a quick view of the windows network hierarchy.
    Windows Network -> Sub-network -> List of machines ->
    List of folders on a given machine -> List of sub-folders within a given folder and so on ....
    Here is what I am trying to do.
    1) Double Click 'Network Places' from the desktop.
    2) When the window 'File Browser: Network Places' opens, it appears that my Solaris workstation has automatically detected the presence of a Windows network. Very slick!
    3) Double click on the 'Windows Network (SMB)' icon.
    4) A list of sub-networks appear. Occasionally this list is not 100% complete. ie. there are 5 sub-networks but only 2 will appear on occasion.
    5) Double click the smaller network that I wish to access. The various machines within this network appear as a list of hostnames.
    6) Double click on the machine that I wish to access and a list of folders on this machine appear.
    7) Double click on the folder that I wish to access and a list of subfolders is presented. When I try to naviagte deeper an 'Authentication Required' window appears. I enter my username, password and domain. I also check the 'Remember password for this session' and 'Save password in keyring' options.
    8) I am prompted with a 'Create Default Keyring' window asking me for a password to associate with the default keyring. I enter the same password that I entered in Step 7.
    9) A list of subfolders appears. This is great. But when I attempt to navigate any deeper ... I cannot. A dialog pops up saying "The folder contents could not be displayed" with a message stating "You do not have permissions necessary to view the contents of the "foldername".
    At this point, the file broswer gets in to a funny state. I try to hit the 'up' arrow to return to the folder which I could previously access but I am now greeted with a dialog claiming that I do not have permissions to access this folder. I cannot access anything past the first folder level on a given machine even though I could just a minute ago. This "funniness" clears up after some length of time. ie. if I come back in an hour, I can once again reach part 1 of step 9 without being greeted with permission errors.
    Are there any SAMBA config options that I need to tweak or add to my smb.conf file to make :
    1) the listing of Windows networks be more consistent
    2) the permission checking to be more consistent and stable
    Or does the issue lie on the Windows side of things.
    Thanks in advance for any help,
    Tim

    Thought I would update this one myself in case anyone else was having similar problems with a baseline Sol10 install. I suspected the problem was with Samba or the GNOME Keyring Manager. I downloaded Sun's new Update Connection tool to stay on top of patches. (http://www.sun.com/download/products.xml?id=42e02045) I installed a slew of GNOME and underlying OS patches and things are working now. Pays to stay up to date. ;)

  • Can you still access Windows partition with open firmware password installed?

    Can you still access Windows partition with open firmware password installed? If so, do you still use the Option key upon restart?

    I don't use Bootcamp.  However, I do know that with a firmware password, pressing the option key at startup will cause the password entry screen to come up; after entering the password, you will get the boot device choice screen.
    So, if Bootcamp partitions normally show up on that screen then it should work just fine, or so I'd imagine.

  • How to restrict users working on Windows 7 clients from accessing Windows Explorer and other systems in the network through Group Policy with a domain controller running on Windows Server 2008 r2

    Dear All,
    We are having an infrastructure setup of around 500 client computers managed through group policy.
    Recently the domain controllers have been migrated from Windows Server 2003 to Server 2008 R2.
    Since this account requires extremely strict environment, we need to figure the solution for restricting the users from access anything locally.
    It would be great if you can assist me with the following query.
    How to restrict users logged on Windows 7 clients from accessing Windows Explorer and browsing other systems in the network through Group Policy with a domain controller running on Windows Server 2008 r2 ?
    Can we disable Network Tab on the left hand pane ?
    explorer.exe is blocked already, but users are able to enter the Windows Explorer by clicking on the name which is visible on the Start Menu.

    >   * explorer.exe is blocked already, but users are able to enter the
    >     Windows Explorer by clicking on the name which is visible on the
    >     Start Menu.
    You cannot block explorer.exe when you do not replace the shell - the
    desktop you see effectively IS explorer.exe...
    Your requirement sounds like you need a custom shell:
    http://gpsearch.azurewebsites.net/#2812
    Martin
    Mal ein
    GUTES Buch über GPOs lesen?
    NO THEY ARE NOT EVIL, if you know what you are doing:
    Good or bad GPOs?
    And if IT bothers me - coke bottle design refreshment :))

  • I installed Windows 7 in my Macbook pro, I can access Windows data in Mac, but I can't copy and delete it. and the same case while i am working in Windows. Could you please guide me if there is any solution, where I could copy/paste/delete my data.

    I installed Windows 7 in my Macbook pro, I can access Windows data in Mac, but I can't copy and delete it. and the same case while i am working in Windows. Could you please guide me if there is any solution, where I could copy/paste/delete my data.

    OS X can natively read NTFS of Windows, but not write to it.
    Windows can't read or write to HFS+ of OSX, and that's a good thing from a security standpoint.
    Ideally if you share files between operating systems you should have a FAT/MSDOS formated USB key or hard drive. (exFAT external drive if any of your files are over 4GB in size) both these formats are universal for OS X or Windows.
    If you install software into Windows and OS X to read each others formats, then you have to pay to update/upgrade it deal with headaches.
    If you swtich between Windows and OS X a lot, don't need full hardware performance for Windows, you may consider installing virtual machine software like VMFusion or Parallels which can take a copy of your Windows in Bootcamp and place it into OS X as a file then run that copy of Windows in a window in OS X like so.
    Advantage here is you run most of your light weight Windows programs like this at the same time as OS X.
    Benefit is you can run just about any Windows or Linux version and OSX server editions (not client versions)
    Bootcamp only allows Windows 7, that's it now.
    You'll also be interested in two fre pieces of software, Carbon Copy Cloner and Winclone on macupdate.com.
    CCC clones OS X partition and Winclone clones the Bootcamp partition. Valuable for you.
    Good Luck

  • Send Windows Friendly Attachments option in Mail 1.0

    I'm troubleshooting for my brother and need to know if the "Send Windows Friendly Attachments" option is available in Mail 1.0. He couldn't find the option.

    Attachments<Send Friendly Window
    If the following is not done, the PC recipients will see multiple attachments. (Mail will send the file’s data fork and its resource fork) .......
    Method 1....
    • Menu>Edit>Attachments>Always Send Windows Friendly Attachments
    • Open Mail ....Command-N or click the “New” icon in the Toolbar
    • Type what is required and then..
    • Click the “Attach” icon in the Toolbar
    • Navigate to the file
    • Select “Choose File”
    • Click “Send” icon in the Toolbar or (command-Shift-D)
    Method 2 ...
    • Open Mail ....Command-N or click the “New” icon in the Toolbar
    • Type what is required and then..
    • Click the “Attach” icon in the Toolbar
    • Navigate to the file and check the box “Send Windows Friendly
    Attachments”
    • Select “Choose File”
    • Click “Send” icon in the Toolbar or (command-Shift-D)
    Method 3 ....
    • Make a folder on your Desktop and add files to it (pictures, etc).
    • Control-click on the folder and choose “Create Archive of 'Your Folder'.”
    • This makes a compressed archive of the folder in ZIP format.
    • Drag the resulting archive (it ends with '.zip') into your mail message.
    george
    iMac Flat Panel 1.25GHz 80GB 256MB   Mac OS X (10.3.9)  

  • Restrict access to buttons, regions, etc. on a per user basis?

    My application restricts access to buttons, regions, etc. on a per user basis.
    Here is my application logic...
    1. A User can only edit items they own.
    2. A Super-User can edit all items
    So, when a user logs in, I use a post-authentication process to set the user ID to an application level item.
    Now, for example, to have an edit button display on a page, I need to check the item's owner ID against the application level user ID...and check to see if this user is on the Super User list via a query.(which could be set to another application level item upon login...I guess)
    Question...What is the best way to do this? Conditional display? Authorization scheme?
    Would something like the following work for a Conditional Display?
    Condition: SQL Expression
    &USER_ID.=&P6_ITEM_OWNER_ID. OR USER_ID in (select USER_ID from table where USER_ID=&USER_ID.)
    How would I do this with an Authorization Scheme? (I like the idea of updating the logic in single location...but I'm not sure if it is possible because I have to check PX_OWNER_ID would be different on each page.)

    Hi Denes,
    Thanks for your code which allows user to edit (if authorized) and view (if not).
    But some how - I do not get the image to show up - instead it show a small underline.
    From SQL point of view - here is what I get - when i run the sql
    '<img src="/i/ed-item.gif">',2,CR TEST,,,,dune2.cit.cornell.edu,CRDMTEST.CIT.CORNELL.EDU,PSPROD,,,CRDMTEST
    Here is my wrap_image function
    create or replace function wrap_image(p_user_name in varchar2,p_dm_name_id in number)
    return varchar2 IS
    v boolean := False;
    ret_val varchar2(1000);
    begin
    dbms_output.put_line('user='||p_user_name);
    dbms_output.put_line('dm_name='||p_dm_name_id);
    -- Check authorization if the user is super user - return true, else if he has edit priv on dm_name_id - return true - else false
    v:=ACL_DMTOOLS_DM_PRIV(p_user_name,p_dm_name_id);
    if v then
    ret_val := '<img src="/i/ed-item.gif">';
    ret_val := ''''||ret_val||'''';
    dbms_output.put_line('TRUE');
    else
    ret_val := '';
    dbms_output.put_line('FALSE');
    end if;
    return ret_val;
    end;
    Thanks for your great educational site.
    Regards
    atul

Maybe you are looking for