aboutsummaryrefslogtreecommitdiffstats
path: root/common/utf8conv.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2022-09-13gpg,common,scd,sm: Function prototype fixes for modern compiler.NIIBE Yutaka1-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]>
2022-06-03Remove remaining support for WindowsCEWerner Koch1-4/+0
--
2021-12-17w32: Prepare for the case gcrypt.h will not include winsock2.h.NIIBE Yutaka1-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]>
2020-08-28common: Fix fallback handling to utf-8.NIIBE Yutaka1-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]>
2020-08-21common,w32: Do not assume the ANSI code during string conversion.Werner Koch1-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]>
2020-08-20gpgtar: Make --files-from and --null work as described.Werner Koch1-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]>
2017-02-24Clarify text of LGPLv2+/GPLv2+ licensed files.Werner Koch1-2/+2
--
2017-02-21Clean up word replication.Yuri Chornoivan1-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]>
2016-11-05Change all http://www.gnu.org in license notices to https://Werner Koch1-1/+1
--
2016-04-21w32: Replace libiconv DLL by iconv feature of libgpg-error.Werner Koch1-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]>
2016-01-26gpgtar,w32: Fix gpgtar 8 bit encoding handling on W32Andre Heinecke1-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]>
2015-09-01common: Assume an utf-8 locale on iconv errors.Werner Koch1-6/+4
* common/utf8conv.c (handle_iconv_error): Use utf-8 as fallback. Signed-off-by: Werner Koch <[email protected]>
2015-04-24common: Remove JNLIB from boiler plate (jnlib merge).Werner Koch1-3/+3
* common/README.jnlib: Remove. -- This is the final part of merging jnlib into gnupg/common.
2015-04-24common: Remove libjnlib-config.h (jnlib merge).Werner Koch1-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]>
2014-02-26common: Require an installed libiconv.Werner Koch1-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.
2012-12-13utf8conv.c: Add hacks for Android.Werner Koch1-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]>
2012-06-05Change all quotes in strings and comments to the new GNU standard.Werner Koch1-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.
2011-09-30Change JNLIB license to LGPLv3+ or GPLv2+.Werner Koch1-7/+18
This is to allow the use of this code with code under GPLv2(only).
2011-02-04Nuked almost all trailing white space.post-nuke-of-trailing-wsWerner Koch1-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.
2010-07-23Some work on the dirmngrWerner Koch1-1/+1
2010-04-26Fix preference setting in new keysWerner Koch1-0/+5
2010-03-10Merged jnlib into common.Werner Koch1-0/+0
2010-02-26First batch of changes to support W32CE.Werner Koch1-4/+79
Note that jnlib/w32-reg.c is not yet ready.
2009-07-07Minor bug fixes.Werner Koch1-2/+4
Enhanced function docs.
2008-06-11Removed unused variable.Werner Koch1-7/+2
2007-07-04Changed to GPLv3.Werner Koch1-7/+5
Removed intl/.
2007-06-14A whole bunch of changes to allow building for Windows.Werner Koch1-0/+47
See the ChangeLogs for details.
2007-06-06First steps towards supporting W32.Werner Koch1-1/+56
This is mainly source code reorganization. Update gnulib. g10/ does currently not build.
2007-05-04UTF-8 FixesWerner Koch1-0/+7
2006-12-06Fixes for CVE-2006-6235Werner Koch1-1/+1
2006-10-02Fix for bug 537Werner Koch1-14/+14
2006-09-22Added iconv support and doc cleanups.Werner Koch1-195/+377
2006-06-20Updated FSF's address.Werner Koch1-1/+2
2005-06-16gcc-4 defaults forced me to edit many many files to get rid of theWerner Koch1-9/+12
char * vs. unsigned char * warnings. The GNU coding standards used to say that these mismatches are okay and better than a bunch of casts. Obviously this has changed now.
2003-06-18Finished the bulk of changes for gnupg 1.9. This included switchingWerner Koch1-0/+448
to libgcrypt functions, using shared error codes from libgpg-error, replacing the old functions we used to have in ../util by those in ../jnlib and ../common, renaming the malloc functions and a couple of types. Note, that not all changes are listed below becuause they are too similar and done at far too many places. As of today the code builds using the current libgcrypt from CVS but it is very unlikely that it actually works.