cyrillic

PHP function ord() returns wrong code of cirilyc charecter

余生长醉 提交于 2019-12-25 04:24:09
问题 The utf-8 charcode of Russian 'A' is 1040 (decimal). Javascript do it right: > 'А'.charCodeAt(0) > 1040 But PHP code <?php echo ord('А');?> returns 208. Please note that in the beginning of the PHP code I have: mb_internal_encoding( 'UTF-8' ); setlocale( LC_CTYPE, 'ru_RU' ); How can I implement coding and decoding of UTF-8 characters in PHP? Use another function instead of ord ? 回答1: <?php mb_internal_encoding('UTF-8'); header('Content-Type: text/html; charset=UTF-8'); ?> <html> <head> <meta

Dealing with the Cyrillic encoding in Node.Js / Express App

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-25 02:04:38
问题 In my app a user submits text through a form's textarea and this text is passed on to the app and is then processed by jsesc library, which escapes javascript strings. The problem is that when I type in a text in Russian, such as нам #интересны наши #идеи what i get is '\u043D\u0430\u043C #\u0438\u043D\u0442\u0435\u0440\u0435\u0441\u043D\u044B \u043D\u0430\u0448\u0438 #\u0438\u0434\u0435\u0438' I then need to pass this data through FlowDock to extract hashtags and FlockDock just does not

RestEasy - upload file (multipart/form-data) with cyrillic name

…衆ロ難τιáo~ 提交于 2019-12-25 01:52:45
问题 When I upload a file to the server, everything is fine. But if the name of the file contains cyrillic characters, on the server that filename appears with question marks. I don't set any character encoding when I send request to the server. I know that if you don't put any character encoding in the header when you make request, the default character encoding that RestEasy puts is us-ascii. I tried a couple of ways to change it: With new String(filename.getBytes("US-ASCII"), "UTF-8") - didn't

Sentiment Analysis Text Analytics in Russian / Cyrillic languages

和自甴很熟 提交于 2019-12-24 18:33:44
问题 This is an incredible resource. I cant believe how generous contributors to the platform are. I would be grateful for any advice on dealing with text analytics / Sentiment Analysis using Russian / Cyrillic languages. Syuzhet is my preferred tool - the opportunity to obtain sentiment across 8 emotions as well as negative and positive polarity is outstanding. However, i don't think it supports Cyrillic languages. Is there any alternative? 回答1: I was just trying to figure out the same thing: how

Cyrillic alphabet in Multibyte

爷,独闯天下 提交于 2019-12-24 13:28:37
问题 I am pretty new to working with C++. I have an MFC project which needs be translated in to Russian . If I change the MFC settings to Unicode it shows correctly. My question is: Is it possible to print cyrillic alphabet with Multibyte ? If so, how? Thanks guys! 回答1: I encourage you to build your MFC application using Unicode (to be more precise: UTF-16 in MFC/Visual Studio settings), as you wrote "If I change MFC to Unicode it shows correctly." . At the same time, you can still use another

Capture and insert Unicode text (Cyrillic) into MS access database

戏子无情 提交于 2019-12-23 21:48:27
问题 I inherited an old web application, that is writing data collected in a form into an Access 2007 database using classic ASP. Now they need it to be able to collect input in the Cyrillic alphabet. I'm completely unfamiliar with code page/ char sets, and working with non latin alphabets. I've tried altering the charset on the entry form page to ISO-8859-1 , which does seem to store the ascii value of the characters (eg: #1076;). So that is interpreted and read by the browser fine, but is pretty

Java java.io.filenotfoundexception for file path with cyrillic characters

痴心易碎 提交于 2019-12-23 06:57:22
问题 I have a file whose name contains characters not only from the plain ASCII character set, but also from a non-ASCII character set. In my case it contains Cyrillic characters. Here's a snippet of my code: String fileName = "/Users/dnelepov/Downloads/тест изображение.png"; File sendFile = new File(fileName); if (sendFile.exists()) { // Some code } The code in sendFile.exists if block is not being executed. Why isn't the file recognized? My system configuration locale LANG="ru_RU.UTF-8" LC

Can not correctly insert cyrillic symbols into NTEXT field in SQL Server database

风流意气都作罢 提交于 2019-12-13 22:00:48
问题 How can I insert cyrillic symbols into my database? I have table Articles and Web API controller with CRUD operations. Articles { id: int, summary: nvarchar, text: ntext } If I insert data using t-sql like insert into Articles values (1, N'текст', N'еще много текста') all works fine - data in database is ok - all russian symbols looks good. But if I insert data using ajax field 'text' filled by question marks: '??? ????? ??????' $.post("http://localhost:1000/api/articles", { id: 1, summary:

Displaying cyrillic text from file

懵懂的女人 提交于 2019-12-13 02:12:37
问题 Well, I have got a file with cyrillic characters. I am loading it, getting a string from it and then trying to display it with sf::Text. That's what my code looks like: #include <iostream> #include <SFML/Graphics.hpp> #include <fstream> #include <string> using namespace std; int main() { sf::RenderWindow window(sf::VideoMode(800,600),"Learn me"); sf::Text before; wifstream lvl; lvl.open("text.txt"); sf::Font font; font.loadFromFile("CODE2000.ttf"); before.setFont(font); before

URL for russian language - cyrillic or latin

风流意气都作罢 提交于 2019-12-12 05:38:12
问题 I am doing website translation to russian language and I dont know what is better, more used for URL namespace - cyrillic or latin, for example xyz.com/команда or xyz.com/komanda. I found when I was googling more sites in latin. Is it more used in Russia? 回答1: depends on server, usually browser converts not Latin url symbols to UTF-8 and sends, server may accept them or reject. For example, all these 3 URL below are identical: https://www.rabota.ru/vacancy/программист/ https://www.rabota.ru