summaryrefslogtreecommitdiffstats
path: root/base/utf8.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix / suppress new unused warnings for mingw+clangDan Willemsen2017-11-291-1/+1
| | | | | | Bug: 69933068 Test: mmma system/core Change-Id: I089166a979d3d8c5ada38a7745d507b555048499
* Add (partial) support for Windows long pathsRenaud Paquay2017-06-281-2/+50
| | | | | | | | | | | | | | * Update android::base::utf8::open/unlink to support Windows long paths * Add android::base::utf8::fopen, also with support for Windows long paths * Upcoming CLs will add additional APIs to support additional use cases Test: Added tests to utf8_test Bug: 38268753 Change-Id: If72af327f3487766f5370a2f43ee9cabd4a8a810
* base: remove execute bit from utf8.cpp, utf8_test.cpp.Josh Gao2017-04-271-0/+0
| | | | | Test: none Change-Id: Idcd7feb2f3a7dc8706c498c55100e82d029858e0
* Track rename of base/ to android-base/.Elliott Hughes2015-12-041-2/+2
| | | | Change-Id: Idf9444fece4aa89c93e15640de59a91f6e758ccf
* adb: win32: remove widen()/narrow() in favor of UTF8ToWide()/WideToUTF8()Spencer Low2015-11-121-6/+23
| | | | | | | | | | | | | | Now that we have a more standardized API (also available in Chromium), switch to it. Another benefit is real error handling instead of just killing the process on invalid Unicode. Make UTF8ToWide()/WideToUTF8() set errno to EILSEQ on bad input. This is the same error code that wcsrtombs(3) uses. Update the unittest to check for EILSEQ. Change-Id: Ie92acf74d37adaea116cf610c1bf8cd433741e16 Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
* Revert "Revert "adb/base: fix adb push of Unicode filenames on Win32""Elliott Hughes2015-11-111-0/+170
| | | | | | | | | This reverts commit cc8cd59456ca485a51cd6fd388c8bcb1af4a8f9b. With the dependency on libcutils (for gettid for non-bionic) removed, this no longer breaks the build. Change-Id: I645bd6876e2502ddc1535b69af1e645c0df9d178
* Revert "adb/base: fix adb push of Unicode filenames on Win32"Elliott Hughes2015-11-111-170/+0
| | | | | | | | This reverts commit ac9514a4524f98b2029dbcda9326a763d25492b1. The new gettid dependency caused other breakage. Change-Id: I74a75e40c30a45beb275f9dd38eb5c7beac15fbd
* adb/base: fix adb push of Unicode filenames on Win32Spencer Low2015-11-101-0/+170
ae5a6c06cdd9ae1a0a7cdc42711f0a5594e54dcd made adb push use android::base::ReadFileToString() for small files, but that API did not support UTF-8 filenames on Windows, until this fix which does the following: - Add android::base::{WideToUTF8,UTF8ToWide}() which are only available on Windows. The signatures are based on Chromium's APIs of the same name. - Add the namespace android::base::utf8 which has versions of APIs that take UTF-8 strings. To use this, make sure your code is in a namespace and then do "using namespace android::base::utf8;". On Windows, this will make calls to open() call android::base::utf8::open(), and on other platforms, it will just call the regular ::open(). - Make ReadFileToString() and WriteStringToFile() use utf8::open() and utf8::unlink(). - Adapt unittests from Chromium. - fastboot needs to link with libcutils because it links with libbase which depends on libcutils for gettid() for logging. Change-Id: I1aeac40ff358331d7a1ff457ce894bfb17863904 Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>