Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
List installed codepages
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00901344
Message ID:
00901563
Vues:
18
Thanks Neil,
That was exactly what I needed.

Chris


>Christopher,
>
>You need to use the CultureInfo class found in the System.Globalization namespace. This class will allow you to interrogate the current OS's codepage (OEM, Ansi, DOS, Mac) through the TextInfo class.
>
>using System;
>using System.Globalization;
>
>public class Test
>{
>   public static void Main()
>   {
>      // Show them all.
>      foreach (CultureInfo cInfo in CultureInfo.GetCultures(CultureTypes.AllCultures))
>      {
>         Console.WriteLine(cInfo.TextInfo.OEMCodePage);
>      }
>
>      // Show the culture associated with the OS.
>      Console.WriteLine(CultureInfo.InstalledUICulture);
>
>      // Show the culture associated with the current thread.
>      Console.WriteLine(CultureInfo.CurrentCulture);
>      Console.WriteLine(CultureInfo.CurrentCulture.TextInfo.OEMCodePage);
>   }
>}
>
>Regards
>Neil
Chris
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform