Questions tagged [cyrillic]

For questions about code that deals with any kind of Cyrillic (including the original Cyrillic script and the modern Cyrillic alphabets, such as the Russian alphabet).

563 questions
0
votes
2 answers

PHP function ord() returns wrong code of cirilyc charecter

The utf-8 charcode of Russian 'A' is 1040 (decimal). Javascript do it right: > 'А'.charCodeAt(0) > 1040 But PHP code returns 208. Please note that in the beginning of the PHP code I have: mb_internal_encoding( 'UTF-8'…
Roman Matveev
  • 563
  • 1
  • 6
  • 22
0
votes
3 answers

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

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 нам #интересны…
Aerodynamika
  • 7,883
  • 16
  • 78
  • 137
0
votes
1 answer

Regular expressions: re.sub(), \b and cyrillic characters

I'm trying to replace whole appearance of cyrillic word in text: # -*- coding: utf-8 -*- import re S = u"раз Два трИ".lower() print re.sub(ur"\bдва\b", u"четыре", S, re.U) Prints "раз два три" while "раз четыре три" is expected. At the same time…
0
votes
1 answer

Insert Cyrillic text into SQL Server

I need to insert Cyrillic text into a SQL Server database. I'm using MVC 4, and the controller code is: public ActionResult AddCategory(Ferro_Balkan.Models.category Cat) { Ferro_Balkan.Models.ferroEntities ent = new…
0
votes
2 answers

SOAP UI sending attachment which contains Cyrillic characters

I am working on an application allowing user to upload XML file to server through a web service. Files are sent as attachment. I am using MTOM. I was able to send and receive file. The problem is that my XML file contains Cyrillic letter. When I…
Russell'sTeapot
  • 373
  • 2
  • 11
  • 21
0
votes
1 answer

Scanner fails to work with files containing Cyrillic characters

I'm trying to use Scanner class to parse text files. But it turns out that if the file contains Russian words the scanner can't read the file at all. scanner.hasNextLine() returns false at its very first call. Is this normal behavior of the Scanner…
Roman
  • 199
  • 1
  • 5
0
votes
2 answers

PHP MySQL search cyrillic characters

I would like to optimize my search sql query from cyrillic input. If the user enters 'čšž' database return results with 'čšž' and 'csz'. $result = mysqli_query($con,"SELECT * FROM Persons WHERE name = ?"); SQL or PHP should convert character to non…
Laky
  • 745
  • 2
  • 12
  • 25
0
votes
0 answers

regexp cyrillic filename not matches

I take a list of files with php glob(."*.pdf"). All files have cyrillic names. For example: ООО «Рога и копыта» Then I load the company names from the database and try to find them in the file names: preg_match("/$firm_name/ui", $file_name,…
user451555
  • 308
  • 3
  • 12
0
votes
1 answer

How to pull cyrillic data from SQL as array and use str_replace()

I have the code: mysql_connect('...'); mysql_select_db('...'); $result = mysql_query('SELECT `oldword`, `newword` FROM `#_words`'); $find = array(); $replace = array(); while ($row = mysql_fetch_assoc($result)) { $find[] = $row['oldword']; …
stckvrw
  • 1,689
  • 18
  • 42
0
votes
1 answer

Broken Cyrillic file name when uploading to server

I have this php function: function upload_file($f,$fn){ switch($f['type']){ case 'image/jpeg':$image = imagecreatefromjpeg($f['tmp_name']);break; case 'image/png':case…
thecore7
  • 484
  • 2
  • 8
  • 29
0
votes
2 answers

XCode, String encoding, cyrillic letters

I have an issue with my iPhone application or rather Xcode. I am currently trying to convert a string that i get from Google Translate to a string format that supports cyrillic letters. i tried many String Encodings so far, but none of them seem to…
Gustl007
  • 245
  • 1
  • 2
  • 12
0
votes
0 answers

How I can print characters from various alphabets in python 3?

I am trying to work with cyrillic alphabet and latin alphabet with central european characters, however I am not able to print cyrillic characters. Take a look at the sample code below. # -*- coding: utf-8 -*- print("ň") print("ф") I've been able…
zap
  • 61
  • 1
  • 3
0
votes
1 answer

preg_replace all cyrillic characters between brackets

I need to replace all cyrillic characters to the latin equivalents between "[]" brackets. Here is the example: Приметимо да формула (\ref{ј5121}) обухвата и случајеве а) и б). Заиста, из (\ref{ј5121}), за $x_1=x_2$ добија…
Igor Hrcek
  • 715
  • 5
  • 16
0
votes
1 answer

Problems with sending cyrillic messages through socket

I am trying to send cyrillic messages through socket and I have problem. The message doesn't go through. If I use char (on both sides), on the other side I receive, the cyrilic part incorrect. If I use WCHAR (on both sides), I receive the message…
nikolakoco
  • 1,343
  • 1
  • 12
  • 22
0
votes
1 answer

Cyrillic in the android.widget.TextView

Im using android view client to automate testing of an android app, but all of the views are on Russian, so when I'm using dump.py i have something like this: android.widget.TextView id/no_id/16 ╨в╤А╨░╨╜╤Б╨┐╨╛╤А╤В How can I see it in normal view?…
alohamaloha
  • 147
  • 1
  • 12