Comments (2)
посмотрел по сырцам...
базовая поддержка utf8 в наличии...
можно ли сделать так, чтобы по умолчанию все строки обрабатывались в utf8? типа #"строка" дергалось бы lengthUtf8... естественно через ключи компиляции
и еще странность нашел: "string".lenUtf8() возвращает null, похоже проблема в objectscript.cpp:21651: условие на ненулевое количество аргументов лишнее
from objectscript.
Спасибо большое за найденную ошибку, исправил. Сейчас более новая версия языка находится в проекте https://github.com/unitpoint/os-fcgi
По поводу utf8 так и предусматривалось, сейчас можно сделать так в коде OS:
String.__len = String.lenUtf8
и #"строка" будет возвращать количество символом с учетом кодировки utf8. Регулярные выражения работают эквивалентно php, т.е. что бы работать с utf8, нужно использовать модификатор 'u', например:
Regexp("/([^\s]+)/isug")
'g' - глобальный поиск, как в JavaScript, т.е. обрабатываются все вхождения, а не первое.
from objectscript.
Related Issues (20)
- целые числа HOT 5
- Just an educational question HOT 7
- Make MySQL optional HOT 1
- Some OS X fixes HOT 4
- $ operator example! HOT 4
- malloc.h still not found :)
- Crash on launch HOT 3
- Need help for an implementation
- C++ embedding questions HOT 14
- Syntactical question HOT 2
- Binding function-local variable to returned lambda function HOT 2
- Accessing object properties HOT 2
- Convenience types and methods HOT 1
- About Core::* types HOT 6
- OS::setGlobal(FuncDef *) ? HOT 2
- The OS::call*() functions
- Cannot compile on Mageia 4 HOT 3
- os-fcgi: process.cwd() returning nothing...
- OS::create() should use template in dynamic cast
- Can not serialize the debug backtrace?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from objectscript.