summaryrefslogtreecommitdiff
path: root/src/win32/utf-conv.h
Commit message (Collapse)AuthorAgeFilesLines
* consistent header guardsethomson/header_guardsEdward Thomson2018-02-011-2/+2
| | | | use consistent names for the #include / #define header guard pattern.
* Make sure to always include "common.h" firstPatrick Steinhardt2017-07-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | Next to including several files, our "common.h" header also declares various macros which are then used throughout the project. As such, we have to make sure to always include this file first in all implementation files. Otherwise, we might encounter problems or even silent behavioural differences due to macros or defines not being defined as they should be. So in fact, our header and implementation files should make sure to always include "common.h" first. This commit does so by establishing a common include pattern. Header files inside of "src" will now always include "common.h" as its first other file, separated by a newline from all the other includes to make it stand out as special. There are two cases for the implementation files. If they do have a matching header file, they will always include this one first, leading to "common.h" being transitively included as first file. If they do not have a matching header file, they instead include "common.h" as first file themselves. This fixes the outlined problems and will become our standard practice for header and source files inside of the "src/" from now on.
* git_buf_put_w: introduce utf16->utf8 conversionEdward Thomson2015-05-011-0/+4
|
* win32: use NT-prefixed "\\?\" pathsEdward Thomson2014-12-161-39/+0
| | | | | | | | | | | | When turning UTF-8 paths into UCS-2 paths for Windows, always use the \\?\-prefixed paths. Because this bypasses the system's path canonicalization, handle the canonicalization functions ourselves. We must: 1. always use a backslash as a directory separator 2. only use a single backslash between directories 3. not rely on the system to translate "." and ".." in paths 4. remove trailing backslashes, except at the drive root (C:\)
* Win32: UTF-8 <-> WCHAR conversion overhaulPhilip Kelley2014-04-191-10/+66
|
* Reintroduce type for UTF8 win32 path conversionsRussell Belfer2013-08-131-4/+5
|
* Rename git__win32_path fns to git_win32_pathRussell Belfer2013-08-131-4/+7
|
* Fix mingw cross-compile buildBen Straub2013-08-131-0/+1
|
* windows: Missing renames.Vicent Marti2013-08-131-1/+1
|
* windows: Path conversion with better semanticsVicent Marti2013-08-131-4/+3
|
* Make utf-8 source strings unlimitedBen Straub2013-08-101-2/+2
|
* Discriminate path-specific and general UTF-X conversionsBen Straub2013-08-081-3/+14
|
* Rename git_win_str_utf* to git_win32_path_utf*Ben Straub2013-08-071-4/+4
|
* Add typedefs for win32 utf-8 and utf-16 buffersBen Straub2013-08-071-2/+5
| | | | ...and normalize the signatures of the two conversion functions.
* Split UTF-16 and UTF-8 buffer sizes for win32Ben Straub2013-08-051-1/+2
| | | | | Also fixed up call-sites to use the correct buffer sizes, especially when converting to utf-8.
* update copyrightsEdward Thomson2013-01-081-1/+1
|
* Add POSIX compat lstat() variant for win32Russell Belfer2012-11-141-2/+2
| | | | | | | | | | The existing p_lstat implementation on win32 is not quite POSIX compliant when setting errno to ENOTDIR. This adds an option to make is be compliant so that code (such as checkout) that cares to have separate behavior for ENOTDIR can use it portably. This also contains a couple of other minor cleanups in the posix_w32.c implementations to avoid unnecessary work.
* Add bounds checking to UTF-8 conversionutf8-winVicent Marti2012-08-281-1/+1
|
* windows: Keep UTF-8 on the stack yoVicent Marti2012-08-281-3/+4
|
* Update Copyright headerschu2012-02-131-1/+1
| | | | Signed-off-by: schu <schu-github@schulog.org>
* Add missing semicolonVincent Lee2012-01-031-1/+1
|
* Add support for macros and cache flush API.Russell Belfer2011-12-291-0/+1
| | | | | | | | | | | | | | 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.
* windows: Add support for non-UTF codepagesVicent Marti2011-10-261-0/+17
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.