如何使用c#.net开发marathi字体的软件。 [英] How to develop a software in marathi font using c#.net.

查看:76
本文介绍了如何使用c#.net开发marathi字体的软件。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何设计软件或在C#.net&中添加马拉地语字体如何在mysql数据库中插入marathi字体。



我尝试过:



如何设计软件或在C#.net&中添加马拉地语字体如何在mysql数据库中插入marathi字体。

how to design software or add marathi font in C#.net & how to insert marathi font in mysql database.

What I have tried:

how to design software or add marathi font in C#.net & how to insert marathi font in mysql database.

推荐答案

简而言之:你需要创建一个支持unicode字符 [ ^ ]



然后你必须对连接字符串进行一些更改:

In a short: you need to create database which supports unicode characters[^]

Then you have to make some changes in your connection string:


  1. 将二进制Blob视为UTF8 [ ^ ]
  2. 如何在C#和MySQL之间使用Unicode |装配力 [ ^ ]

  1. Treating Binary Blobs As UTF8[^]
  2. How to Make Unicode Available between C# and MySQL | Assemble Force[^]



注意:在这两种情况下,一个正确的连接字符串选项 [ ^ ]。有关详细信息,请按照上述链接进行操作。



警告:在更改数据库中的任何内容之前,请创建备份! !!




Note: in both cases, a proper connection string option[^] must be respectively changed. For more details, follow the above links.

Warning: before you change anything in your database, create a backup!!!

Quote:

(。 ..)

如果您还没有创建表格,可以使用以下语句创建表格。



(...)
If you haven’t created the table, you can create one with the following statement.

CREATE TABLE IF NOT EXISTS  (ID BIGINT NOT NULL PRIMARY KEY) ENGINE=MyIASM  DEFAULT CHRACTER SET=utf8 COLLATE utf8_general_ci;





此语句将创建一个包含 u的表tf8 编码和 utf8_general_ci as COLLATE



如果你想更改表格以支持utf8,你可以按照下面的语法。





This statement will create a table with utf8 encoding and utf8_general_ci as COLLATE.

If you want to change the table to support utf8, you can follow the syntax below.

ALTER TABLE _table_name_ CHARACTER SET=UTF8 COLLATE=utf8_general_ci;





使用C#连接到MySQL





为了连接,必须遵循两点MySQL并访问Unicode。第一步是使用Charset = utf8打开连接,第二步是使用连接set names utf8运行命令。编码区分大小写,所以你不能写它像UTF8utf-8





Connect to MySQL in C#



There are two point you must follow in order to connect to MySQL and access Unicode. The first step is to open the connection with "Charset=utf8", and the second step is to run the command with the connection "set names utf8". And the encoding is case sensitive, so you mustn’t write it like "UTF8" or "utf-8".

string conn_str = "server=202.117.15.72;uid=username;pwd=password;database=wordbase;Charset=utf8;";
// some other codes…
MySqlConnection conn = new MySqlConnection(connstr);
conn.Open();
MySqlCommand command = new MySqlCommand();
command.Connection = conn;
command.CommandText = "set names utf8";
command.ExecuteNonQuery();





通过上面的步骤,您可以自由地使用Unicode访问MySQL。

(...)




这篇关于如何使用c#.net开发marathi字体的软件。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆