aboutsummaryrefslogtreecommitdiff
path: root/src/util/string.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Apply NetBSD string conversion workaround to OpenBSD as well (#12618)Mantar2022-07-311-3/+3
|
* Fix BSD iconv declarationsavilli2022-06-051-14/+0
|
* Support CSS Color Module Level 4 (#12204)Lars Müller2022-04-271-0/+1
|
* Update directory name sanitizationShadowNinja2022-04-081-25/+14
| | | | | Only ASCII spaces have to be handles specially, and leading spaces are also disallowed.
* Add additional reserved directory namesShadowNinja2022-04-081-2/+29
|
* Print announce error response (#11878)ShadowNinja2022-01-011-0/+16
| | | | | | | | Fix HTTPFetch caller and request ID to 64 bits Check that allocated caller ID is not DISCARD Print body if serverlist request returns error Don't print control characters from HTTP responses Document special HTTPFetch caller IDs Allow unicode to be printed
* Fix src/util/string.cpp on NetBSDnia2021-09-191-3/+16
| | | | | | - iconv() prototype changed from traditional Unix defintion to POSIX definition in 9.99.x. - wchar_t is not a valid character set for iconv. Share code with Android for using UTF-32.
* Add `minetest.colorspec_to_colorstring` (#10425)Vincent Robinson2021-04-231-217/+198
|
* Drop wide/narrow conversion functionssfan52021-02-021-57/+2
| | | | | | | | | The only valid usecase for these is interfacing with OS APIs that want a locale/OS-specific multibyte encoding. But they weren't used for that anywhere, instead UTF-8 is pretty much assumed when it comes to that. Since these are only a potential source of bugs and do not fulfil their purpose at all, drop them entirely.
* Refactor utf8_to_wide/wide_to_utf8 functionssfan52021-02-021-33/+24
|
* Fix some minor code issues all over the placesfan52020-12-241-1/+1
|
* Sanitize world directory names on create. Keep original name separate (#9432)Hugues Ross2020-07-281-0/+68
| | | Blacklisted characters are replaced by '_' in the path. The display name is stored in world.mt, and duplicate file names are resolved by adding an incrementing suffix (_1, _2, _3, etc).
* Add server side translations capability (#9733)EvidenceB Kidscode2020-04-251-10/+31
| | | | * Add server side translations capability
* Android: fix handling non-latin characters on older Android devices (#9309)Maksim2020-04-171-0/+8
|
* GUIHyperText: Fix bug with UTF8 chars in action name + simplify UTF8 stringw ↵Jean-Patrick Guerrero2020-03-071-25/+0
| | | | | conversion (#9437) Co-authored-by: Pierre-Yves Rollo <dev@pyrollo.com>
* Android: fix cyrillic characters, update iconv lib (#9117)Maksim2020-01-131-105/+18
|
* Formspec: add hypertext elementPierre-Yves Rollo2019-11-031-0/+25
|
* Fix memory leak in guiConfirmRegistrationHybridDog2018-07-061-0/+2
|
* Formspecs: Allow setting alpha value for the box[] elementThomas--S2018-04-231-5/+8
|
* Move files to subdirectories (#6599)Vitaliy2017-11-081-2/+2
| | | | * Move files around
* Translations: prevent remote crash with invalid translationsEkdohibs2017-08-251-1/+6
|
* Add clientside translations.Ekdohibs2017-08-241-0/+194
|
* Modernize source code: last part (#6285)Loïc Blot2017-08-201-5/+4
| | | | | | | | | | | * Modernize source code: last par * Use empty when needed * Use emplace_back instead of push_back when needed * For range-based loops * Initializers fixes * constructors, destructors default * c++ C stl includes
* Clean up numeric.h and split FacePositionCache from itShadowNinja2017-05-061-0/+1
| | | | | I also optiized FacePositionCache a bit: I removed a map lookup and vector copy from both branches of getFacePosition.
* Add color names from web page referenced in luaapi docsapier2017-01-151-0/+7
|
* Random misc. warning fixes and cleanupskwolekr2016-06-111-8/+11
| | | | | | - Fix unused c_sand member warning in Valleys Mapgen - Fix some code style - Make some std::string params const ref
* Escape more strings: formspecs, item descriptions, infotexts...Ekdohibs2016-04-241-27/+0
| | | | | | Also, change the escape character to the more standard \x1b Thus, it can be used in the future for translation or colored text, for example.
* Remove chat escape sequences from chat messages, for future colored chat.Ekdohibs2016-03-151-0/+27
|
* Fix indianred and indigo of color-stringRui2015-08-191-2/+2
|
* Android: bypass broken wide_to_utf8 with wide_to_narrow (again)est312015-08-191-0/+8
| | | | | | | | | This bypass had to be re-enabled as some users reported issues, even after the iconv build fix. While utf8_to_wide works well, wide_to_utf8 is quite broken on android, for some reason, and some devices (unrelated from build configuration).
* Android: fix horrible libiconv buildest312015-07-291-12/+0
| | | | | | | | | | | | | | | | | | | Before, our libiconv build was a joke. We first called configure for our own build host system, then called make, before we executed a Android.mk script we provided as patch. The first "native make" always failed, and the LIBICONV_LIB file setting in our Makefile didn't match the built one, resulting in an always-rebuild of iconv. This commit cleans up this total mess, removes the double-build, and the Android.mk, and properly calls ./configure with the according target platform, and uses a built toolchain. As we have to deal with the android bug "NDK: Support for prebuild libs with full sonames" https://code.google.com/p/android/issues/detail?id=55868 as the 2013 patch https://lists.gnu.org/archive/html/libtool-patches/2013-06/msg00002.html by Google's David Turner wasn't inside the 2011 libtool, we pass -avoid-version to libtool. Thanks to the proper build, wide_to_utf8 works for android now, removing us of the need to disable it.
* Use UTF-8 instead of narrowest312015-07-081-0/+10
| | | | | Use wide_to_utf8 and utf8_to_wide instead of wide_to_narrow and narrow_to_wide at almost all places. Only exceptions: test functions for narrow conversion, and chat, which is done in a separate commit.
* Fix *BSD build with GNU iconvkwolekr2015-06-291-13/+28
|
* Fix string conversion error messageest312015-06-231-1/+1
|
* Fail iconv call gracefullyest312015-06-171-5/+24
| | | | No freezing when inbuf_size doesn't decrease over time.
* Android: bypass broken wide_to_utf8 with wide_to_narrowest312015-06-141-1/+8
| | | | | While utf8_to_wide works well, wide_to_utf8 is quite broken on android, for some reason.
* Add utf-8 conversion utilities and re-add intlGUIEditBoxest312015-06-131-0/+94
|
* Make early protocol auth mechanism generic, and add SRPest312015-05-111-23/+0
| | | | | | | Adds everything needed for SRP (and everything works too), but still deactivated, as protocol v25 init packets aren't final yet. Can be activated by changing the LATEST_PROTOCOL_VERSION header to 25 inside networkprotocol.h.
* Refactor around translatePasswordest312015-04-171-2/+3
| | | | | | | Change types for passed password from wstring to string, which removes converting back and forth in most cases. Move the narrow_to_wide conversion, where its neccessary, closer to irrlicht. Remove trailing spaces in guiPasswordChange.cpp. Make parameters for translatePassword passed as const reference.
* For usages of assert() that are meant to persist in Release builds (when ↵Craig Robbins2015-03-071-5/+4
| | | | NDEBUG is defined), replace those usages with persistent alternatives
* Fix Android text bug (no text displaying)Craig Robbins2015-03-071-68/+63
|
* Fix narrow_to_wide_c (ANDROID)Craig Robbins2015-03-021-3/+5
| | | | | * Ensure converted string is NUL terminated * Restore logic to that used prior to 9e2a9b5
* Fix minor memory leak (Android)Craig Robbins2015-02-271-5/+10
|
* Move hex.h to util/Loic Blot2015-02-211-2/+2
|
* Move sha1.hpp and base64.hpp to util/Loic Blot2015-02-211-2/+2
|
* Fix gettext on MSVCBlockMen2015-02-121-10/+13
|
* Fix Android build of narrow_to_wideShadowNinja2015-02-111-4/+5
|
* Reduce gettext wide/narrow and string/char* conversionsShadowNinja2015-02-051-23/+48
|
* Deduplicate code and use stdlib in string functionsShadowNinja2015-01-031-4/+11
|
* Added names colours and refactored parseColorString()Craig Robbins2014-10-291-50/+261
|