summaryrefslogtreecommitdiff
path: root/src/win32/utf-conv.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix bugs in UTF-8 <-> UTF-16 conversionRussell Belfer2012-05-241-13/+10
| | | | | | | | | | | | The function to convert UTF-16 to UTF-8 was only allocating a buffer of wcslen(utf16str) bytes for the UTF-8 string, but that is not sufficient if you have multibyte characters, and so when those occured, the conversion was failing. This updates the conversion functions to use the Win APIs to calculate the correct buffer lengths. Also fixes a comparison in the unit tests that would fail if you did not have a particular environment variable set.
* Merge remote-tracking branch 'scottjg/fix-mingw32' into developmentVicent Martí2012-05-051-0/+1
|\ | | | | | | | | | | | | | | Conflicts: src/netops.c src/netops.h src/transports/http.c tests-clar/clar
| * Fix missing prototype warning in utf-conv.cScott J. Goldman2012-05-051-0/+1
| |
* | Fix warnings on 64-bit windows buildsRussell Belfer2012-04-171-20/+11
| | | | | | | | | | This fixes all the warnings on win64 except those in deps, which come from the regex code.
* | Continue error conversionRussell Belfer2012-03-141-5/+15
|/ | | | | | | This converts blob.c, fileops.c, and all of the win32 files. Also, various minor cleanups throughout the code. Plus, in testing the win32 build, I cleaned up a bunch (although not all) of the warnings with the 64-bit build.
* Update Copyright headerschu2012-02-131-1/+1
| | | | Signed-off-by: schu <schu-github@schulog.org>
* Add support for macros and cache flush API.Russell Belfer2011-12-291-0/+5
| | | | | | | | | | | | | | Add support for git attribute macro definitions. Also, add support for cache flush API to clear the attribute file content cache when needed. Additionally, improved the handling of global and system files, making common utility functions in fileops and converting config and attr to both use the common functions. Adds a bunch more tests and fixed some memory leaks. Note that adding macros required me to use refcounted attribute assignment definitions, which complicated, but probably improved memory usage.
* global: Properly use `git__` memory wrappersVicent Marti2011-10-281-2/+2
| | | | | Ensure that all memory related functions (malloc, calloc, strdup, free, etc) are using their respective `git__` wrappers.
* windows: Add support for non-UTF codepagesVicent Marti2011-10-261-0/+88
Our previous assumption that all paths in Windows are encoded in UTF-8 is rather weak, specially when considering that Git is encoding-agnostic. These set of functions allow the user to change the library's active codepage globally, so it is possible to access paths and files on all international versions of Windows. Note that the default encoding here is UTF-8 because we assume that 99% of all Git repositories will be in UTF-8. Also, if you use non-ascii characters in paths, anywhere, please burn on a fire.