Difference between revisions of "CONVERTUTF8"
Yvonne.milne (Talk | contribs) |
Yvonne.milne (Talk | contribs) (→Description) |
||
(6 intermediate revisions by the same user not shown) | |||
Line 6: | Line 6: | ||
==See Also== | ==See Also== | ||
− | [[STRCONV()]], [[Command Line Switches]] | + | [[STRCONV()]], [[Command Line Switches]], [[SET CODEPAGE]], [[SET CODEPAGEDATA]] |
==Description== | ==Description== | ||
Line 12: | Line 12: | ||
The source codepage can be optionally specified using CODEPAGE <cp-id>, where <cp-id> is the numeric or character string codepage id. If not specified, "Windows-1250" is assumed. | The source codepage can be optionally specified using CODEPAGE <cp-id>, where <cp-id> is the numeric or character string codepage id. If not specified, "Windows-1250" is assumed. | ||
+ | |||
+ | The conversion process overwrites the original file, so it is recommended that a backup is made prior to conversion. | ||
+ | |||
+ | NOTE: For .rsp Lianja/VFP Server Pages scripts, include the charset meta head element: | ||
+ | |||
+ | <code lang="html"> | ||
+ | <head> | ||
+ | <meta charset="UTF-8"> | ||
+ | <!-- any other head elements --> | ||
+ | </head> | ||
+ | </code> | ||
==Example== | ==Example== | ||
Line 18: | Line 29: | ||
convertutf8 database mydatabase | convertutf8 database mydatabase | ||
convertutf8 table mytable | convertutf8 table mytable | ||
− | convertutf8 file | + | convertutf8 file mygreekfile.txt codepage "Windows-1253" |
− | convertutf8 file | + | convertutf8 file mygreekfile.txt codepage 1253 |
</code> | </code> | ||
Line 28: | Line 39: | ||
[[Category:Lianja VFP Extensions]] | [[Category:Lianja VFP Extensions]] | ||
[[Category:VFP Command Extensions]] | [[Category:VFP Command Extensions]] | ||
+ | [[Category:Lianja v2.0]] | ||
+ | [[Category:Localization]] |
Latest revision as of 08:31, 12 August 2020
Contents
Purpose
Convert a codepage encoded App, database, file or table to its UTF-8 equivalent
Syntax
CONVERTUTF8 APP <app-name> | DATABASE <database-name> | FILE <file-name> | TABLE <table-name> [CODEPAGE <cp-id>]
See Also
STRCONV(), Command Line Switches, SET CODEPAGE, SET CODEPAGEDATA
Description
The CONVERTUTF8 command converts a codepage encoded App, database, file or table to its UTF-8 equivalent. Specify the type of file to be converted. CONVERTUTF8 APP looks for the App <app-name> in the current Apps directory. CONVERTUTF8 DATABASE looks for the database <database-name> in the current data directory. CONVERTUTF8 FILE looks for the <file-name> in the current directory (include the file extension) or specified location if the full path is included. CONVERTUTF8 TABLE looks for the table <table-name> in the currently open database then, if not found, in the current directory.
The source codepage can be optionally specified using CODEPAGE <cp-id>, where <cp-id> is the numeric or character string codepage id. If not specified, "Windows-1250" is assumed.
The conversion process overwrites the original file, so it is recommended that a backup is made prior to conversion.
NOTE: For .rsp Lianja/VFP Server Pages scripts, include the charset meta head element:
Example
convertutf8 app myapp convertutf8 database mydatabase convertutf8 table mytable convertutf8 file mygreekfile.txt codepage "Windows-1253" convertutf8 file mygreekfile.txt codepage 1253