aboutsummaryrefslogtreecommitdiffstats
path: root/common/utf8conv.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* gpg,common,scd,sm: Function prototype fixes for modern compiler.NIIBE Yutaka2022-09-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | * common/gettime.c (gnupg_get_time): It has no arguments. * common/signal.c (gnupg_block_all_signals): Likewise. (gnupg_unblock_all_signals): Likewise. * common/utf8conv.c (get_native_charset): Likewise. * g10/cpr.c (is_status_enabled, cpr_enabled): Likewise. * g10/getkey.c (getkey_disable_caches): Likewise. * g10/keygen.c (ask_expiredate): Likewise. * g10/passphrase.c (have_static_passphrase): Likewise. (get_last_passphrase): Likewise. * g10/tdbio.c (tdbio_is_dirty, tdbio_sync): Likewise. (tdbio_get_dbname, open_db, tdbio_db_matches_options): Likewise. (tdbio_read_nextcheck): Likewise. * g10/trustdb.c (how_to_fix_the_trustdb): Likewise. * scd/scdaemon.c (scd_get_socket_name): Likewise. * sm/passphrase.c (have_static_passphrase): Likewise. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* Remove remaining support for WindowsCEWerner Koch2022-06-031-4/+0
| | | | --
* w32: Prepare for the case gcrypt.h will not include winsock2.h.NIIBE Yutaka2021-12-171-0/+4
| | | | | | | | | | | | | | | * common/dynload.h: Include specific headers only. * common/exechelp-w32.c: Include <windows.h>. * common/gettime.c: Likewise. * common/utf8conv.c: Likewise. * tests/gpgscm/ffi.c: Likewise. * tools/gpgconf.c: Likewise. * configure.ac: Check winsock2.h, removing gl_HEADER_SYS_SOCKET. -- GnuPG-bug-id: 5731 Signed-off-by: NIIBE Yutaka <[email protected]>
* common: Fix fallback handling to utf-8.NIIBE Yutaka2020-08-281-1/+1
| | | | | | | | | | * common/utf8conv.c (handle_iconv_error): Set NO_TRANSLATION. -- GnuPG-bug-id: 5038 Fixes-commit: 99c9bf7defd6c1ac9cc49c84e6c78eeb886a6952 Signed-off-by: NIIBE Yutaka <[email protected]>
* common,w32: Do not assume the ANSI code during string conversion.Werner Koch2020-08-211-2/+21
| | | | | | | | | | | | | | * common/utf8conv.c (get_w32_codepage): New. (wchar_to_native): Use instead oc CP_ACP. (native_to_wchar): Ditto. -- This should fix quite some issue; we fixed it when using the iconv based machinery about 14 years ago. At some point we introduced the new conversion functions because Windows started to support UTF-8 natively. The fix comes late but well, it is done. Signed-off-by: Werner Koch <[email protected]>
* gpgtar: Make --files-from and --null work as described.Werner Koch2020-08-201-1/+1
| | | | | | | | | | | | * tools/gpgtar-create.c (gpgtar_create): Add args files_from and null_names. Improve reading from a file. * tools/gpgtar.c: Make global vars static. (main): Remove tests for --files-from and --null option combinations. Pass option variables to gpgtar_create. -- GnuPG-bug-id: 5027 Signed-off-by: Werner Koch <[email protected]>
* Clarify text of LGPLv2+/GPLv2+ licensed files.Werner Koch2017-02-241-2/+2
| | | | --
* Clean up word replication.Yuri Chornoivan2017-02-211-1/+1
| | | | | | | | | -- This fixes extra word repetitions (like "the the" or "is is") in the code and docs. Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* Change all http://www.gnu.org in license notices to https://Werner Koch2016-11-051-1/+1
| | | | --
* w32: Replace libiconv DLL by iconv feature of libgpg-error.Werner Koch2016-04-211-4/+12
| | | | | | | | | | | * configure.ac: Do nor require libiconv for W32. * common/utf8conv.c [W32]: Do not incluce iconv.h. Request libgpg-error iconv macros. (jnlib_iconv): Use ICONV_CONST macro. * build-aux/speedo/w32/inst.nsi [!WITH_GUI]: Do not install libiconv. * build-aux/speedo.mk (speedo_spkgs) [!WITH_GUI]: Likewise. Signed-off-by: Werner Koch <[email protected]>
* gpgtar,w32: Fix gpgtar 8 bit encoding handling on W32Andre Heinecke2016-01-261-10/+55
| | | | | | | | | | | | | | | | | | | | | * common/utf8conv.c (wchar_to_utf8): Factor code out to ... (wchar_to_cp): new. (utf8_to_wchar): Factor code out to ... (cp_to_wchar): new. (wchar_to_native): New. (native_to_wchar): New. * tools/gpgtar-create.c (fillup_entry_w32): Use native_to_wchar. (scan_directory): Use wchar_to_native. -- Gpgtar needs to handle filenames in the local 8 bit encoding on Windows as it uses the 8 bit file io functions. GnuPG-bug-id: 1624, 1746 Patch from bug 1624 modified to fit into GnuPG 2.1 by wk. Signed-off-by: Werner Koch <[email protected]>
* common: Assume an utf-8 locale on iconv errors.Werner Koch2015-09-011-6/+4
| | | | | | * common/utf8conv.c (handle_iconv_error): Use utf-8 as fallback. Signed-off-by: Werner Koch <[email protected]>
* common: Remove JNLIB from boiler plate (jnlib merge).Werner Koch2015-04-241-3/+3
| | | | | | | * common/README.jnlib: Remove. -- This is the final part of merging jnlib into gnupg/common.
* common: Remove libjnlib-config.h (jnlib merge).Werner Koch2015-04-241-19/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * common/libjnlib-config.h: Remove. * common/common-defs.h (getenv) [HAVE_GETENV]: New. From removed header. (getpid) [HAVE_W32CE_SYSTEM]: New. From removed header. * common/argparse.c: Include util.h and common-defs.h. Replace jnlib_ macro names for non-GNUPG builds by x* names. * common/dotlock.c: Ditto. * common/logging.c: Include util.h and common-defs.h. Replace jnlib_ symbol names by x* names. * common/strlist.c: Ditto. * common/utf8conv.c: Ditto. * common/w32-reg.c: Ditto. * common/mischelp.c: Ditto. Also remove _jnlib_free. * common/stringhelp.c: Ditto. (JNLIB_LOG_WITH_PREFIX): Do not depend on this macro. * common/logging.h (JNLIB_LOG_WITH_PREFIX): Do not depend on this macro. -- This is part 1 of the patches to merge the jnlib files into common/. It does not make much sense to keep jnlib/ files separate. They are not often use elsewhere and maintaining the complex marcos stuff is too troublesome for the future. Signed-off-by: Werner Koch <[email protected]>
* common: Require an installed libiconv.Werner Koch2014-02-261-89/+4
| | | | | | | | | | | | | | * common/utf8conv.c: Remove dynload.h. (load_libiconv): Remove. Remove all calls to it. -- The iconv functions are standard feature on most systems and in any case libiconv can be used to provide the functions. The old code used to dlopen iconv.dll on Windows. This goes back to GnuPG-1 which was designed as a one-binary program without any hard dependencies. GnuPG2 however demands a lot of libraries anyway and thus there is no more need for the fragile code to load a possible wrong version of iconv.dll at runtime.
* utf8conv.c: Add hacks for Android.Werner Koch2012-12-131-14/+55
| | | | | | | | | | | | | * common/utf8conv.c [HAVE_ANDROID_SYSTEM]: Do not include iconv.h. (iconv_open, iconv_close, load_libiconv) [HAVE_ANDROID_SYSTEM]: New dummy functions. (set_native_charset) [HAVE_ANDROID_SYSTEM]: Force use of "utf-8". (jnlib_iconv_open) [HAVE_ANDROID_SYSTEM]: Act the same as under W32. (jnlib_iconv) [HAVE_ANDROID_SYSTEM]: Ditto. (jnlib_iconv_close) [HAVE_ANDROID_SYSTEM]: Ditto. -- Co-authored-by: Hans of Guardian <[email protected]>
* Change all quotes in strings and comments to the new GNU standard.Werner Koch2012-06-051-4/+4
| | | | | | | | | | | | | | | | | | | The asymmetric quotes used by GNU in the past (`...') don't render nicely on modern systems. We now use two \x27 characters ('...'). The proper solution would be to use the correct Unicode symmetric quotes here. However this has the disadvantage that the system requires Unicode support. We don't want that today. If Unicode is available a generated po file can be used to output proper quotes. A simple sed script like the one used for en@quote is sufficient to change them. The changes have been done by applying sed -i "s/\`\([^'\`]*\)'/'\1'/g" to most files and fixing obvious problems by hand. The msgid strings in the po files were fixed with a similar command.
* Change JNLIB license to LGPLv3+ or GPLv2+.Werner Koch2011-09-301-7/+18
| | | | This is to allow the use of this code with code under GPLv2(only).
* Nuked almost all trailing white space.post-nuke-of-trailing-wsWerner Koch2011-02-041-38/+38
| | | | | | | | We better do this once and for all instead of cluttering all future commits with diffs of trailing white spaces. In the majority of cases blank or single lines are affected and thus this change won't disturb a git blame too much. For future commits the pre-commit scripts checks that this won't happen again.
* Some work on the dirmngrWerner Koch2010-07-231-1/+1
|
* Fix preference setting in new keysWerner Koch2010-04-261-0/+5
|
* Merged jnlib into common.Werner Koch2010-03-101-0/+813