aboutsummaryrefslogtreecommitdiffstats
path: root/src/w32-gettext.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2024-08-02w32: Allow initialization of new threads to utf8 mode.Werner Koch1-5/+11
* src/init.c (utf8_for_new_threads): New var. (_gpgrt_w32_utf8_for_new_threads): New func. (get_tls): Init the TLS utf8 flag from the new var. * src/w32-gettext.c (_gpg_w32_gettext_use_utf8): Implement new flag. -- GnuPG-bug-id: 7185
2022-03-04w32: Support file names longer than MAX_PATH.Werner Koch1-2/+2
* src/sysutils.c (any8bitchar): Remove. (_gpgrt_fname_to_wchar): New. (_gpgrt_mkdir): Use instead of plain utf8 conversion. (_gpgrt_access): Reimplement using GetFileAttributesW so that long files names are supported. * src/estream.c (_gpgrt_w32_get_last_err_code): New. (func_file_create_w32): New. (_gpgrt_fopen): Handle the "sysopen" mode flag. Support mapping of /dev/null. (_gpgrt_freopen): Support mapping of /dev/null. * src/w32-gettext.c (load_domain): Allow long file names. * src/visibility.c (gpgrt_free_wchar): Make function public. (gpgrt_fname_to_wchar): Ditto. (gpgrt_utf8_to_wchar): Ditto. (gpgrt_wchar_to_utf8): Ditto. * src/w32-add.h (gpgrt_free_wchar): New prototype. (gpgrt_fname_to_wchar): Ditto. (gpgrt_utf8_to_wchar): Ditto. (gpgrt_wchar_to_utf8): Ditto. * src/gpg-error.def.in: Add them here too.
2021-03-05w32: Allow Unicode paths for the gettext domain.Werner Koch1-45/+12
* src/w32-gettext.c: Remove remaining WindowsCE support (load_domain): Use CreateFileW.
2021-03-04w32: Minor cleanup of w32-gettextWerner Koch1-3/+3
* src/w32-gettext.c: Include gpgrt.h instead gpg-error.h. (utf8_to_wchar): Use underscored function. (_gpg_w32_textdomain): Ditto. --
2020-10-09w32: Support utf8 also for getcwd.Werner Koch1-15/+40
* src/sysutils.c (_gpgrt_getcwd) [W32]: Implement utf-8 support. * src/w32-gettext.c (wchar_to_native): Factor some code out to .. (wchar_to_cp): new. (_gpgrt_wchar_to_utf8): New. * tests/t-stringutils.c: Include windows.h. (utf8_to_wchar): New. (wchar_to_utf8): New. (mygetcwd): Use wchar version for Windows. (main): New option --pwd.
2020-08-21core,w32: Add UTF-8 support to gpgrt_fopen, gpgrt_mkdir and gpgrt_chdir.Werner Koch1-5/+34
* src/protos.h: New. * src/Makefile.am (libgpg_error_la_SOURCES): Add file. * src/gpgrt-int.h: Include protos.h. * src/sysutils.c (_gpgrt_mkdir) [W32]: Make UTF-8 aware. (_gpgrt_chdir) [W32]: Ditto. * src/w32-gettext.c: Include protos.h. (utf8_to_wchar): Allow for strings. (_gpgrt_utf8_to_wchar): New. (_gpgrt_free_wchar): New. * src/estream.c (map_w32_to_errno): Add more error codes. (_gpgrt_w32_set_errno): New. (any8bitchar) [W32]: New helper. (func_file_create) [W32]: Convert file name and use _wopen. -- GnuPG-bug-id: 4083 Signed-off-by: Werner Koch <[email protected]>
2018-12-07Add W32-only function gpgrt_w32_override_locale.Werner Koch1-18/+55
* src/w32-gettext.c (struct override_locale): new. (my_nl_locale_name): Take care of that. (gpgrt_w32_override_locale): New. * src/gpg-error.def.in: Add gpgrt_w32_override_locale. * src/gpg-error.c: New command --locale for Windows. -- GnuPG-bug-id: 3733 Signed-off-by: Werner Koch <[email protected]>
2016-11-18w32-iconv: Remove invalid link to unicode.org in comment.Daniel Kahn Gillmor1-1/+0
-- http://www.unicode.org/unicode/onlinedat/languages.html currently says: The mapping information between Macintosh and Windows codes is no longer available on the Unicode site. Please consult the Macintosh and Windows developer sites. And there are no outbound links. Signed-off-by: Daniel Kahn Gillmor <[email protected]>
2016-02-08w32: Confirm the 639-1 code for Venda is "ve"Daniel Kahn Gillmor1-5/+1
-- https://www.loc.gov/standards/iso639-2/php/code_changes.php says that ve is indeed the 2-character code for Venda: >> This alpha-2 ISO 639-1 code was approved in 1999 and included in >> ISO 639-1: 2002. It was mistakenly missing in earlier versions of >> the tables on the ISO639-2 web site. As of January 2003, it has >> been included.
2016-02-08Convert http links to https where possible in the source.Daniel Kahn Gillmor1-2/+2
-- * use https for bug reporting * in comments and docs, use https to refer to: - www.gnu.org - creativecommons.org - translationproject.org - mail.gnome.org - www.perl.org - www.ctan.org - www.cl.cam.ac.uk - www.ntg.nl - cygwin.com - www.ethnologue.com
2015-12-07Fix windows 8bit encoding conversionAndre Heinecke1-5/+13
* src/w32-gettext.c (wchar_to_native): Convert to ConsoleOutputCP. -- Just using CP_ACP did not neccessarily convert to the correct codepage as codepages might differ between ConsoleOutput and GUI output (which it usually does). This fixes encoding issues on the Windows commandline.
2015-11-19Fix typos found by codespell.Justus Winter1-1/+1
-- Signed-off-by: Justus Winter <[email protected]>
2013-07-15w32: Fix corrupted string output.Werner Koch1-4/+18
* src/w32-gettext.c (get_string): Pass the nul of the utf-8 string to the conversion function but keep TRANSLEN without the nul. -- The bug first occurred on Windows 8 but it is a real thing. Assuming that a malloced buffer is zeroed out is not solid assumptions ;-)
2013-07-15Remove trailing spaces from w32-gettext.c.Werner Koch1-26/+26
--
2010-11-012010-11-01 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-1/+3
* src/w32-gettext.c (CreateFileA): Rename to ... (MyCreateFileA): ... this, but provide macro CreateFileA.
2010-10-31s/abort/TerminateProcess/Werner Koch1-1/+2
2010-10-292010-10-29 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-19/+52
* src/w32-gettext.c: Guard include of <sys/types.h>. Do not include <sys/stat.h>. (CreateFileA) [HAVE_W32CE_SYSTEM]: New wrapper function. (load_domain): Use native Windows API. * src/init.c (TLS_OUT_OF_INDEXES) [HAVE_W32CE_SYSTEM, !TLS_OUT_OF_INDEXES]: Define it. (abort) [!__MINGW32CE__]: Define it.
2010-10-28Add some code to allow building with MSC.Werner Koch1-7/+7
2010-09-16Fix initialization of static libsWerner Koch1-2/+21
2010-09-02Add new error code.Werner Koch1-1/+1
Remove comment cruft.
2010-03-01Add a mapping for ESPIPE on W32CE.Werner Koch1-1/+1
2010-01-21Finished W32CE support.Werner Koch1-959/+1133
2010-01-18Add some code to build nativley under WindowsCE - not finished.Werner Koch1-1/+9
2007-10-29Fixed mingw build problems.Werner Koch1-12/+4
Updated some translations.
2005-11-02Changes for building on W32 without needing libintl.Werner Koch1-15/+11
2005-10-25Fix last change.Marcus Brinkmann1-3/+3
2005-10-252005-10-25 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-4/+72
* src/w32-gettext.c (get_string): Remove extra arguments to utf8_to_native_invocation. (utf8_to_wchar, wchar_to_native): New function. (utf8_to_native): Rewritten.
2005-10-252005-10-25 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-0/+1648
* src/Makefile.am (arch_sources): New variable. (libgpg_error_la_SOURCES): Add $(arch_sources). * src/gettext.h [HAVE_W32_SYSTEM]: Include w32-gettext.h. * src/w32-gettext.h: New file. * src/w32-gettext.c: New file. * src/gpg-error.h.in: Check for gcc's constructor attribute. Use it for gpg_err_init. (GPG_ERR_INITIALIZED): Define if constructor is available. * src/gpg-error.c (main) [GPG_ERR_INITIALIZED]: Don't invoke gpg_err_init. (i18n_init): Call bindtextdomain as well. Now that gpg-error has its own gettext implementation, we can't rely on it anymore. Also, repeat all the w32 stuff for fetching the registry.