codepages

How to change the CP_ACP(0) of windows ANSI apis in an application?

浪尽此生 提交于 2020-01-11 09:17:49
问题 I try to draw text using a dll library which has only interfaces of ANSI version encapsulated windows ANSI apis, but I need to store string data using utf-8. I don't want to convert strings using MultiByte/WideChar functions so I want an approach to change the CP_ACP in my application, so that I can input string data into ANSI apis. thanks. ps: I don't to change the system default codepage. 回答1: CP_ACP represents the system Ansi codepage. You cannot change that on a per-process or per-thread

Controlling codepages in a cmd window when running batch scripts

痞子三分冷 提交于 2020-01-07 04:17:47
问题 I have problems controlling character code pages in a Windows cmd window, or rather in DOS scripts (.bat files) I use for certain tasks on my Windows 7 office computer. Here is the problem: One of my scripts is used to open certain files in their respective programmes, e.g. C:\Stuff\Büroeinrichtung\MyFile.xlsx The crucial thing here is the u-umlaut (ü) in the directory name. In my script I use Start "" "C:\Stuff\Büroeinrichtung\MyFile.xlsx" to start Excel and open the file. This works as long

Bengali encoding

时间秒杀一切 提交于 2020-01-06 04:56:04
问题 Does anybody know what encoding is this (in Bengali language): Bs‡iRx eY©gvjvi cO_g eY© ‡fovi WvK, QvM‡ji e?v e?v WvK ‡Nvovi Mvwo; fvov‡U †gvUiMvwo as an example this web site seems to use it: http://www.shipbreakingbd.info It's using it's own font to represent the contents, it's just an example. I got the text file in this encoding which I need to convert to UTF-8. How can I do it? 回答1: This is a glyph-based encoding used in Mustafa Jabbar's Bengali font series published from Dhaka. But this

Convert text to Latin encoding and decode back problem for Vietnamese

孤街醉人 提交于 2020-01-06 04:01:59
问题 I'm trying to convert Vietnamese to Latin. It is a requirement to send the byte to ESC/P printer (see C# ESC/POS Print Vietnamese for reason why). But my question is very simple, look at this code: Encoding enc = Encoding.GetEncoding(1258); //vietnamese code page string content = "Cơm chiên với các loại gia vị truyền"; string newStr = Encoding.GetEncoding("Latin1").GetString(enc.GetBytes(content)); string origStr = enc.GetString(Encoding.GetEncoding("Latin1").GetBytes(newStr)); //origStr is

How to disable character codes 178 (0xB2) (²) , 179 (0xB3) (³), and 185 (0xB9) (¹) as digits?

梦想的初衷 提交于 2020-01-04 02:40:32
问题 With SWI-Prolog when generating digits using code_type(X,digit). the result is the expected ASCII character codes and 178 (0xB2) ² 179 (0xB3) ³ 185 (0xB9) ¹ e.g. code_type(X,digit). X = 48 ; X = 49 ; X = 50 ; X = 51 ; X = 52 ; X = 53 ; X = 54 ; X = 55 ; X = 56 ; X = 57 ; X = 178 ; X = 179 ; X = 185 ; false. How can I disable or change the functionality so that characters other than 0-9 are not a digit? Obviously I can write a different routine, but I am wondering if there is not some option

Unicode filenames on FAT-32?

感情迁移 提交于 2020-01-01 08:03:30
问题 As far as I understand - NTFS supports Unicode filenames (UTF-16 as Micorsoft claims?). But official MSDN documentation is very vague regarding what codepage(s) is used to store filenames (filepaths) on FAT-32. Here it says that OEM code page (CP437 I assume) is used to store filenames: http://msdn.microsoft.com/en-us/library/windows/desktop/dd317748.aspx But here it turns out that there can be different OEM codepages with CP437 being one of them: http://msdn.microsoft.com/en-us/library

Unicode filenames on FAT-32?

北战南征 提交于 2020-01-01 08:03:27
问题 As far as I understand - NTFS supports Unicode filenames (UTF-16 as Micorsoft claims?). But official MSDN documentation is very vague regarding what codepage(s) is used to store filenames (filepaths) on FAT-32. Here it says that OEM code page (CP437 I assume) is used to store filenames: http://msdn.microsoft.com/en-us/library/windows/desktop/dd317748.aspx But here it turns out that there can be different OEM codepages with CP437 being one of them: http://msdn.microsoft.com/en-us/library

Powershell script runs when pasted into Powershell, but not when run from shortcut

有些话、适合烂在心里 提交于 2019-12-29 08:11:53
问题 I am trying to put together a script that will convert several excel files into PDFs. This is my first time doing something like this in Powershell. I found a link to one online that works. $path = Read-Host -Prompt 'Input Directory Path and Press Enter' $xlFixedFormat = “Microsoft.Office.Interop.Excel.xlFixedFormatType” -as [type] $excelFiles = Get-ChildItem -Path $path -include *.xls, *.xlsx -recurse $objExcel = New-Object -ComObject excel.application $objExcel.visible = $false foreach($wb

Inno Setup - Convert array of string to Unicode and back to ANSI

淺唱寂寞╮ 提交于 2019-12-29 01:29:10
问题 I'm loading a Korean CP51949 (EUC-KR) encoded ANSI file into an array of strings ( LoadStringsFromFile ). My system and the intended end user systems do not have CP51949 set as a legacy non-Unicode encoding. At the moment I have 2 problems with this: Unless I run the application with Locale Emulator (which is just annoying, since the setup itself is in English only), the Korean text is displayed as gibberish. Pos gives wrong results and StringChange fails completely unless I switch to String

Is codepage 65001 and utf-8 the same thing?

十年热恋 提交于 2019-12-28 05:16:40
问题 <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <!--#include file="conn.asp"--> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Is the above code right? 回答1: Yes. UTF-8 is CP65001 in Windows (which is just a way of specifying UTF-8 in the legacy codepage stuff). As far as I read ASP can handle UTF-8 when