{"Entry":{"collection":"func","key":"to-ascii","name":"to_ascii","aliases":[],"metadata":{"changed_in":["8.2"],"changes":[{"descriptions_changed":true,"doc_overhaul":false,"from":"7.2","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"7.3"},{"descriptions_changed":true,"doc_overhaul":false,"from":"7.4","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"8.0"},{"descriptions_changed":true,"doc_overhaul":false,"from":"8.1","group_changed":null,"signatures":{"added":["to_ascii ( string text [, encoding text] ) → text"],"removed":["to_ascii ( text [, encoding] ) → text"]},"status":"changed","to":"8.2"},{"descriptions_changed":false,"doc_overhaul":true,"from":"12","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"13"}],"content_hash":"a4734d958fd0ff3c00a4b98db9abef6f7265907effafbd1d13213a95a5af3e1b","first_version":"7.1","group":"string","group_label":"String Functions And Operators","groups":["string"],"imported_at":"2026-09-27T17:57:28.443012+08:00","last_version":"20","name":"to_ascii","name_key":"to_ascii","position":3049,"present_in":["7.1","7.2","7.3","7.4","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"signature":"to_ascii ( string text ) → text","signature_count":3,"slug":"to-ascii","source_rev":"b7bd9cda","summary":"Converts string to ASCII from another encoding, which may be identified by name or number.","summary_zh":""}},"Definition":{"Collection":"func","Key":"to-ascii","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"to-ascii","SourceRevision":"b7bd9cda","Facts":{"description":"Converts string to ASCII from another encoding, which may be identified by name or number. If encoding is omitted the database encoding is assumed (which in practice is the only useful case). The conversion consists primarily of dropping accents. Conversion is only supported from LATIN1, LATIN2, LATIN9, and WIN1250 encodings. (See the unaccent module for another, more flexible solution.)","description_html":"Converts \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e to ASCII from another encoding, which may be identified by name or number. If \u003cem class=\"parameter\"\u003e\u003ccode\u003eencoding\u003c/code\u003e\u003c/em\u003e is omitted the database encoding is assumed (which in practice is the only useful case). The conversion consists primarily of dropping accents. Conversion is only supported from \u003ccode class=\"literal\"\u003eLATIN1\u003c/code\u003e, \u003ccode class=\"literal\"\u003eLATIN2\u003c/code\u003e, \u003ccode class=\"literal\"\u003eLATIN9\u003c/code\u003e, and \u003ccode class=\"literal\"\u003eWIN1250\u003c/code\u003e encodings. (See the \u003ca href=\"/docs/18/unaccent.html\" title=\"F.48. unaccent — a text search dictionary which removes diacritics\"\u003eunaccent\u003c/a\u003e module for another, more flexible solution.)","description_zh":"","description_zh_html":"","doc":{"anchor":"FUNCTIONS-STRING-OTHER","file":"functions-string.html","slug":"18"},"group":"string","group_label":"String Functions And Operators","lang":"en","layout":"table-new","pages":["functions-string.html"],"prose_only":false,"signatures":[{"description":"Converts string to ASCII from another encoding, which may be identified by name or number. If encoding is omitted the database encoding is assumed (which in practice is the only useful case). The conversion consists primarily of dropping accents. Conversion is only supported from LATIN1, LATIN2, LATIN9, and WIN1250 encodings. (See the unaccent module for another, more flexible solution.)","description_html":"Converts \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e to ASCII from another encoding, which may be identified by name or number. If \u003cem class=\"parameter\"\u003e\u003ccode\u003eencoding\u003c/code\u003e\u003c/em\u003e is omitted the database encoding is assumed (which in practice is the only useful case). The conversion consists primarily of dropping accents. Conversion is only supported from \u003ccode class=\"literal\"\u003eLATIN1\u003c/code\u003e, \u003ccode class=\"literal\"\u003eLATIN2\u003c/code\u003e, \u003ccode class=\"literal\"\u003eLATIN9\u003c/code\u003e, and \u003ccode class=\"literal\"\u003eWIN1250\u003c/code\u003e encodings. (See the \u003ca href=\"/docs/18/unaccent.html\" title=\"F.48. unaccent — a text search dictionary which removes diacritics\"\u003eunaccent\u003c/a\u003e module for another, more flexible solution.)","description_zh":"","description_zh_html":"","examples":[{"expr":"to_ascii('Karél')","result":"Karel"}],"html":"\u003ccode class=\"function\"\u003eto_ascii\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"to_ascii ( string text ) → text","zh_from":""},{"description":"Converts string to ASCII from another encoding, which may be identified by name or number. If encoding is omitted the database encoding is assumed (which in practice is the only useful case). The conversion consists primarily of dropping accents. Conversion is only supported from LATIN1, LATIN2, LATIN9, and WIN1250 encodings. (See the unaccent module for another, more flexible solution.)","description_html":"Converts \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e to ASCII from another encoding, which may be identified by name or number. If \u003cem class=\"parameter\"\u003e\u003ccode\u003eencoding\u003c/code\u003e\u003c/em\u003e is omitted the database encoding is assumed (which in practice is the only useful case). The conversion consists primarily of dropping accents. Conversion is only supported from \u003ccode class=\"literal\"\u003eLATIN1\u003c/code\u003e, \u003ccode class=\"literal\"\u003eLATIN2\u003c/code\u003e, \u003ccode class=\"literal\"\u003eLATIN9\u003c/code\u003e, and \u003ccode class=\"literal\"\u003eWIN1250\u003c/code\u003e encodings. (See the \u003ca href=\"/docs/18/unaccent.html\" title=\"F.48. unaccent — a text search dictionary which removes diacritics\"\u003eunaccent\u003c/a\u003e module for another, more flexible solution.)","description_zh":"","description_zh_html":"","examples":[{"expr":"to_ascii('Karél')","result":"Karel"}],"html":"\u003ccode class=\"function\"\u003eto_ascii\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003eencoding\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003ename\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"to_ascii ( string text, encoding name ) → text","zh_from":""},{"description":"Converts string to ASCII from another encoding, which may be identified by name or number. If encoding is omitted the database encoding is assumed (which in practice is the only useful case). The conversion consists primarily of dropping accents. Conversion is only supported from LATIN1, LATIN2, LATIN9, and WIN1250 encodings. (See the unaccent module for another, more flexible solution.)","description_html":"Converts \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e to ASCII from another encoding, which may be identified by name or number. If \u003cem class=\"parameter\"\u003e\u003ccode\u003eencoding\u003c/code\u003e\u003c/em\u003e is omitted the database encoding is assumed (which in practice is the only useful case). The conversion consists primarily of dropping accents. Conversion is only supported from \u003ccode class=\"literal\"\u003eLATIN1\u003c/code\u003e, \u003ccode class=\"literal\"\u003eLATIN2\u003c/code\u003e, \u003ccode class=\"literal\"\u003eLATIN9\u003c/code\u003e, and \u003ccode class=\"literal\"\u003eWIN1250\u003c/code\u003e encodings. (See the \u003ca href=\"/docs/18/unaccent.html\" title=\"F.48. unaccent — a text search dictionary which removes diacritics\"\u003eunaccent\u003c/a\u003e module for another, more flexible solution.)","description_zh":"","description_zh_html":"","examples":[{"expr":"to_ascii('Karél')","result":"Karel"}],"html":"\u003ccode class=\"function\"\u003eto_ascii\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003eencoding\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003einteger\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"to_ascii ( string text, encoding integer ) → text","zh_from":""}],"zh_from":""},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-STRING-OTHER","file":"functions-string.html","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"to-ascii","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"to_ascii","Summary":"将string从其他编码转换为ASCII，源编码可以用名称或编号指定。如果省略encoding，则使用数据库编码（实际上，这也是唯一有用的情况）。转换主要是去除重音符号。只支持从LATIN1、LATIN2、LATIN9和WIN1250编码转换。（另一种更灵活的解决方案参见unaccent模块。）","BodyHTML":"将\u003cem\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e从其他编码转换为ASCII，源编码可以用名称或编号指定。如果省略\u003cem\u003e\u003ccode\u003eencoding\u003c/code\u003e\u003c/em\u003e，则使用数据库编码（实际上，这也是唯一有用的情况）。转换主要是去除重音符号。只支持从\u003ccode\u003eLATIN1\u003c/code\u003e、\u003ccode\u003eLATIN2\u003c/code\u003e、\u003ccode\u003eLATIN9\u003c/code\u003e和\u003ccode\u003eWIN1250\u003c/code\u003e编码转换。（另一种更灵活的解决方案参见\u003ca href=\"/docs/18/unaccent.html\" rel=\"nofollow\"\u003eunaccent\u003c/a\u003e模块。）\u003cpre\u003eto_ascii ( string text ) → text\u003c/pre\u003e将\u003cem\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e从其他编码转换为ASCII，源编码可以用名称或编号指定。如果省略\u003cem\u003e\u003ccode\u003eencoding\u003c/code\u003e\u003c/em\u003e，则使用数据库编码（实际上，这也是唯一有用的情况）。转换主要是去除重音符号。只支持从\u003ccode\u003eLATIN1\u003c/code\u003e、\u003ccode\u003eLATIN2\u003c/code\u003e、\u003ccode\u003eLATIN9\u003c/code\u003e和\u003ccode\u003eWIN1250\u003c/code\u003e编码转换。（另一种更灵活的解决方案参见\u003ca href=\"/docs/18/unaccent.html\" rel=\"nofollow\"\u003eunaccent\u003c/a\u003e模块。）\u003cpre\u003eto_ascii ( string text, encoding name ) → text\u003c/pre\u003e将\u003cem\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e从其他编码转换为ASCII，源编码可以用名称或编号指定。如果省略\u003cem\u003e\u003ccode\u003eencoding\u003c/code\u003e\u003c/em\u003e，则使用数据库编码（实际上，这也是唯一有用的情况）。转换主要是去除重音符号。只支持从\u003ccode\u003eLATIN1\u003c/code\u003e、\u003ccode\u003eLATIN2\u003c/code\u003e、\u003ccode\u003eLATIN9\u003c/code\u003e和\u003ccode\u003eWIN1250\u003c/code\u003e编码转换。（另一种更灵活的解决方案参见\u003ca href=\"/docs/18/unaccent.html\" rel=\"nofollow\"\u003eunaccent\u003c/a\u003e模块。）\u003cpre\u003eto_ascii ( string text, encoding integer ) → text\u003c/pre\u003e将\u003cem\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e从其他编码转换为ASCII，源编码可以用名称或编号指定。如果省略\u003cem\u003e\u003ccode\u003eencoding\u003c/code\u003e\u003c/em\u003e，则使用数据库编码（实际上，这也是唯一有用的情况）。转换主要是去除重音符号。只支持从\u003ccode\u003eLATIN1\u003c/code\u003e、\u003ccode\u003eLATIN2\u003c/code\u003e、\u003ccode\u003eLATIN9\u003c/code\u003e和\u003ccode\u003eWIN1250\u003c/code\u003e编码转换。（另一种更灵活的解决方案参见\u003ca href=\"/docs/18/unaccent.html\" rel=\"nofollow\"\u003eunaccent\u003c/a\u003e模块。）","SourceRevision":"ca936764","ContentHash":"8c912972ab0839cd70bd30d426381b3f8b5e48f2b399936ad4eeb30f8f418a49","Payload":{"description_zh":"将string从其他编码转换为ASCII，源编码可以用名称或编号指定。如果省略encoding，则使用数据库编码（实际上，这也是唯一有用的情况）。转换主要是去除重音符号。只支持从LATIN1、LATIN2、LATIN9和WIN1250编码转换。（另一种更灵活的解决方案参见unaccent模块。）","description_zh_html":"将\u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e从其他编码转换为ASCII，源编码可以用名称或编号指定。如果省略\u003cem class=\"parameter\"\u003e\u003ccode\u003eencoding\u003c/code\u003e\u003c/em\u003e，则使用数据库编码（实际上，这也是唯一有用的情况）。转换主要是去除重音符号。只支持从\u003ccode class=\"literal\"\u003eLATIN1\u003c/code\u003e、\u003ccode class=\"literal\"\u003eLATIN2\u003c/code\u003e、\u003ccode class=\"literal\"\u003eLATIN9\u003c/code\u003e和\u003ccode class=\"literal\"\u003eWIN1250\u003c/code\u003e编码转换。（另一种更灵活的解决方案参见\u003ca href=\"/docs/18/unaccent.html\" title=\"F.48. unaccent — 去除变音符号的文本检索词典\"\u003eunaccent\u003c/a\u003e模块。）","signatures":[{"description_zh":"将string从其他编码转换为ASCII，源编码可以用名称或编号指定。如果省略encoding，则使用数据库编码（实际上，这也是唯一有用的情况）。转换主要是去除重音符号。只支持从LATIN1、LATIN2、LATIN9和WIN1250编码转换。（另一种更灵活的解决方案参见unaccent模块。）","description_zh_html":"将\u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e从其他编码转换为ASCII，源编码可以用名称或编号指定。如果省略\u003cem class=\"parameter\"\u003e\u003ccode\u003eencoding\u003c/code\u003e\u003c/em\u003e，则使用数据库编码（实际上，这也是唯一有用的情况）。转换主要是去除重音符号。只支持从\u003ccode class=\"literal\"\u003eLATIN1\u003c/code\u003e、\u003ccode class=\"literal\"\u003eLATIN2\u003c/code\u003e、\u003ccode class=\"literal\"\u003eLATIN9\u003c/code\u003e和\u003ccode class=\"literal\"\u003eWIN1250\u003c/code\u003e编码转换。（另一种更灵活的解决方案参见\u003ca href=\"/docs/18/unaccent.html\" title=\"F.48. unaccent — 去除变音符号的文本检索词典\"\u003eunaccent\u003c/a\u003e模块。）","returns":"text","text":"to_ascii ( string text ) → text","zh_from":"doc"},{"description_zh":"将string从其他编码转换为ASCII，源编码可以用名称或编号指定。如果省略encoding，则使用数据库编码（实际上，这也是唯一有用的情况）。转换主要是去除重音符号。只支持从LATIN1、LATIN2、LATIN9和WIN1250编码转换。（另一种更灵活的解决方案参见unaccent模块。）","description_zh_html":"将\u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e从其他编码转换为ASCII，源编码可以用名称或编号指定。如果省略\u003cem class=\"parameter\"\u003e\u003ccode\u003eencoding\u003c/code\u003e\u003c/em\u003e，则使用数据库编码（实际上，这也是唯一有用的情况）。转换主要是去除重音符号。只支持从\u003ccode class=\"literal\"\u003eLATIN1\u003c/code\u003e、\u003ccode class=\"literal\"\u003eLATIN2\u003c/code\u003e、\u003ccode class=\"literal\"\u003eLATIN9\u003c/code\u003e和\u003ccode class=\"literal\"\u003eWIN1250\u003c/code\u003e编码转换。（另一种更灵活的解决方案参见\u003ca href=\"/docs/18/unaccent.html\" title=\"F.48. unaccent — 去除变音符号的文本检索词典\"\u003eunaccent\u003c/a\u003e模块。）","returns":"text","text":"to_ascii ( string text, encoding name ) → text","zh_from":"doc"},{"description_zh":"将string从其他编码转换为ASCII，源编码可以用名称或编号指定。如果省略encoding，则使用数据库编码（实际上，这也是唯一有用的情况）。转换主要是去除重音符号。只支持从LATIN1、LATIN2、LATIN9和WIN1250编码转换。（另一种更灵活的解决方案参见unaccent模块。）","description_zh_html":"将\u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e从其他编码转换为ASCII，源编码可以用名称或编号指定。如果省略\u003cem class=\"parameter\"\u003e\u003ccode\u003eencoding\u003c/code\u003e\u003c/em\u003e，则使用数据库编码（实际上，这也是唯一有用的情况）。转换主要是去除重音符号。只支持从\u003ccode class=\"literal\"\u003eLATIN1\u003c/code\u003e、\u003ccode class=\"literal\"\u003eLATIN2\u003c/code\u003e、\u003ccode class=\"literal\"\u003eLATIN9\u003c/code\u003e和\u003ccode class=\"literal\"\u003eWIN1250\u003c/code\u003e编码转换。（另一种更灵活的解决方案参见\u003ca href=\"/docs/18/unaccent.html\" title=\"F.48. unaccent — 去除变音符号的文本检索词典\"\u003eunaccent\u003c/a\u003e模块。）","returns":"text","text":"to_ascii ( string text, encoding integer ) → text","zh_from":"doc"}],"zh_from":"doc"}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","7.1","7.2","7.3","7.4","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":[{"Version":"18","Ordinal":0,"Hash":"602986467ba68bba8a722496327471de4173c02743c826b985efc37b9148ceee","Text":"to_ascii ( string text ) → text","Returns":"text","Payload":{"description":"Converts string to ASCII from another encoding, which may be identified by name or number. If encoding is omitted the database encoding is assumed (which in practice is the only useful case). The conversion consists primarily of dropping accents. Conversion is only supported from LATIN1, LATIN2, LATIN9, and WIN1250 encodings. (See the unaccent module for another, more flexible solution.)","description_html":"Converts \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e to ASCII from another encoding, which may be identified by name or number. If \u003cem class=\"parameter\"\u003e\u003ccode\u003eencoding\u003c/code\u003e\u003c/em\u003e is omitted the database encoding is assumed (which in practice is the only useful case). The conversion consists primarily of dropping accents. Conversion is only supported from \u003ccode class=\"literal\"\u003eLATIN1\u003c/code\u003e, \u003ccode class=\"literal\"\u003eLATIN2\u003c/code\u003e, \u003ccode class=\"literal\"\u003eLATIN9\u003c/code\u003e, and \u003ccode class=\"literal\"\u003eWIN1250\u003c/code\u003e encodings. (See the \u003ca href=\"/docs/18/unaccent.html\" title=\"F.48. unaccent — a text search dictionary which removes diacritics\"\u003eunaccent\u003c/a\u003e module for another, more flexible solution.)","description_zh":"","description_zh_html":"","examples":[{"expr":"to_ascii('Karél')","result":"Karel"}],"html":"\u003ccode class=\"function\"\u003eto_ascii\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"to_ascii ( string text ) → text","zh_from":""}},{"Version":"18","Ordinal":1,"Hash":"f203997bde37051d08f092c4fd74c0968718f263f8a6206b054e6686968d6cfa","Text":"to_ascii ( string text, encoding name ) → text","Returns":"text","Payload":{"description":"Converts string to ASCII from another encoding, which may be identified by name or number. If encoding is omitted the database encoding is assumed (which in practice is the only useful case). The conversion consists primarily of dropping accents. Conversion is only supported from LATIN1, LATIN2, LATIN9, and WIN1250 encodings. (See the unaccent module for another, more flexible solution.)","description_html":"Converts \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e to ASCII from another encoding, which may be identified by name or number. If \u003cem class=\"parameter\"\u003e\u003ccode\u003eencoding\u003c/code\u003e\u003c/em\u003e is omitted the database encoding is assumed (which in practice is the only useful case). The conversion consists primarily of dropping accents. Conversion is only supported from \u003ccode class=\"literal\"\u003eLATIN1\u003c/code\u003e, \u003ccode class=\"literal\"\u003eLATIN2\u003c/code\u003e, \u003ccode class=\"literal\"\u003eLATIN9\u003c/code\u003e, and \u003ccode class=\"literal\"\u003eWIN1250\u003c/code\u003e encodings. (See the \u003ca href=\"/docs/18/unaccent.html\" title=\"F.48. unaccent — a text search dictionary which removes diacritics\"\u003eunaccent\u003c/a\u003e module for another, more flexible solution.)","description_zh":"","description_zh_html":"","examples":[{"expr":"to_ascii('Karél')","result":"Karel"}],"html":"\u003ccode class=\"function\"\u003eto_ascii\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003eencoding\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003ename\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"to_ascii ( string text, encoding name ) → text","zh_from":""}},{"Version":"18","Ordinal":2,"Hash":"ddd0cdb4bf803983dd9ffb2914a9f2dcf650fc2f6e0f91b9222df19728777399","Text":"to_ascii ( string text, encoding integer ) → text","Returns":"text","Payload":{"description":"Converts string to ASCII from another encoding, which may be identified by name or number. If encoding is omitted the database encoding is assumed (which in practice is the only useful case). The conversion consists primarily of dropping accents. Conversion is only supported from LATIN1, LATIN2, LATIN9, and WIN1250 encodings. (See the unaccent module for another, more flexible solution.)","description_html":"Converts \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e to ASCII from another encoding, which may be identified by name or number. If \u003cem class=\"parameter\"\u003e\u003ccode\u003eencoding\u003c/code\u003e\u003c/em\u003e is omitted the database encoding is assumed (which in practice is the only useful case). The conversion consists primarily of dropping accents. Conversion is only supported from \u003ccode class=\"literal\"\u003eLATIN1\u003c/code\u003e, \u003ccode class=\"literal\"\u003eLATIN2\u003c/code\u003e, \u003ccode class=\"literal\"\u003eLATIN9\u003c/code\u003e, and \u003ccode class=\"literal\"\u003eWIN1250\u003c/code\u003e encodings. (See the \u003ca href=\"/docs/18/unaccent.html\" title=\"F.48. unaccent — a text search dictionary which removes diacritics\"\u003eunaccent\u003c/a\u003e module for another, more flexible solution.)","description_zh":"","description_zh_html":"","examples":[{"expr":"to_ascii('Karél')","result":"Karel"}],"html":"\u003ccode class=\"function\"\u003eto_ascii\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003eencoding\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003einteger\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"to_ascii ( string text, encoding integer ) → text","zh_from":""}}],"Spellings":null,"SQLState":null,"Evidence":null}
