-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
311 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"id":"chatcmpl-73JoAf0rMfuEnKjayuVg0BBqWb18O","object":"chat.completion","created":1681025482,"model":"gpt-3.5-turbo-0301","usage":{"prompt_tokens":23,"completion_tokens":234,"total_tokens":257},"choices":[{"message":{"role":"assistant","content":"As an AI language model, I cannot display characters in a visual format as they are shown in a computer. However, I can list the characters included in the Greek Code Page 737:Α,Β,Γ,Δ,Ε,Ζ,Η,Θ,Ι,Κ,Λ,Μ,Ν,Ξ,Ο,Π,Ρ,Σ,Τ,Υ,Φ,Χ,Ψ,Ω,α,β,γ,δ,ε,ζ,η,θ,ι,κ,λ,μ,ν,ξ,ο,π,ρ,σ,ς,τ,υ,φ,χ,ψ,░,▒,▓,│,┤,╡,╢,╖,╕,╣,║,╗,╝,╜,╛,┐,└,┴,┬,├,─,┼,╞,╟,╚,╔,╩,╦,╠,═,╬,╧,╨,╤,╥,╙,╘,╒,╓,╫,╪,┘,┌,█,▄,▌,▐,▀,ω,ά,έ,ή,ϊ,ί,ό,ύ,ϋ,ώ,Ά,Έ,Ή,Ί,Ό,Ύ,Ώ,±,≥,≤,Ϊ,Ϋ,÷,≈,°,∙,·,√,ⁿ,²,■"},"finish_reason":"stop","index":0}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"id":"chatcmpl-703fFOKPE7ffRr0ecA4V9snJ5lPEG","object":"chat.completion","created":1680248441,"model":"gpt-3.5-turbo-0301","usage":{"prompt_tokens":20,"completion_tokens":610,"total_tokens":630},"choices":[{"message":{"role":"assistant","content":"Here is a list of extended ASCII characters from 128 to 255:,,128: Ç,129: ü,130: é,131: â,132: ä,133: à,134: å,135: ç,136: ê,137: ë,138: è,139: ï,140: î,141: ì,142: Ä,143: Å,144: É,145: æ,146: Æ,147: ô,148: ö,149: ò,150: û,151: ù,152: ÿ,153: Ö,154: Ü,155: ¢,156: £,157: ¥,158: ₧,159: ƒ,160: á,161: í,162: ó,163: ú,164: ñ,165: Ñ,166: ª,167: º,168: ¿,169: ⌐,170: ¬,171: ½,172: ¼,173: ¡,174: «,175: »,176: ░,177: ▒,178: ▓,179: │,180: ┤,181: ╡,182: ╢,183: ╖,184: ╕,185: ╣,186: ║,187: ╗,188: ╝,189: ╜,190: ╛,191: ┐,192: └,193: ┴,194: ┬,195: ├,196: ─,197: ┼,198: ╞,199: ╟,200: ╚,201: ╔,202: ╩,203: ╦,204: ╠,205: ═,206: ╬,207: ╧,208: ╨,209: ╤,210: ╥,211: ╙,212: ╘,213: ╒,214: ╓,215: ╫,216: ╪,217: ┘,218: ┌,219: █,220: ▄,221: ▌,222: ▐,223: ▀,224: α,225: ß,226: Γ,227: π,228: Σ,229: σ,230: µ,231: τ,232: Φ,233: Θ,234: Ω,235: δ,236: ∞,237: φ,238: ε,239: ∩,240: ≡,241: ±,242: ≥,243: ≤,244: ⌠,245: ⌡,246: ÷,247: ≈,248: °,249: ∙,250: ·,251: √,252: ⁿ,253: ²,254: ■,255: "},"finish_reason":"stop","index":0}]} | ||
{"id":"chatcmpl-73JoAf0rMfuEnKjayuVg0BBqWb18O","object":"chat.completion","created":1681025482,"model":"gpt-3.5-turbo-0301","usage":{"prompt_tokens":23,"completion_tokens":234,"total_tokens":257},"choices":[{"message":{"role":"assistant","content":"As an AI language model, I cannot display characters in a visual format as they are shown in a computer. However, I can list the characters included in the Greek Code Page 737:Α,Β,Γ,Δ,Ε,Ζ,Η,Θ,Ι,Κ,Λ,Μ,Ν,Ξ,Ο,Π,Ρ,Σ,Τ,Υ,Φ,Χ,Ψ,Ω,α,β,γ,δ,ε,ζ,η,θ,ι,κ,λ,μ,ν,ξ,ο,π,ρ,σ,ς,τ,υ,φ,χ,ψ,░,▒,▓,│,┤,╡,╢,╖,╕,╣,║,╗,╝,╜,╛,┐,└,┴,┬,├,─,┼,╞,╟,╚,╔,╩,╦,╠,═,╬,╧,╨,╤,╥,╙,╘,╒,╓,╫,╪,┘,┌,█,▄,▌,▐,▀,ω,ά,έ,ή,ϊ,ί,ό,ύ,ϋ,ώ,Ά,Έ,Ή,Ί,Ό,Ύ,Ώ,±,≥,≤,Ϊ,Ϋ,÷,≈,°,∙,·,√,ⁿ,²,■"},"finish_reason":"stop","index":0}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
#include "utf2cp.h" | ||
#include "utfcp437.h" | ||
#include "utfcp737.h" | ||
|
||
CONVERSION_OUTPUT utf_to_cp(int codepage, int value0, int value1, int value2){ | ||
CONVERSION_OUTPUT output; | ||
|
||
if(value0 <= 127){ | ||
output.character = value0; | ||
output.charactersUsed = 1; | ||
return output; | ||
} | ||
output.character = UNKNOWN_CHAR_REPLACEMENT; | ||
|
||
switch(value0){ | ||
case 0xC2: | ||
if(codepage == CODE_PAGE_737){ | ||
output.character = utf_to_cp737_c2(value1); | ||
} else { | ||
output.character = utf_to_cp437_c2(value1); | ||
} | ||
output.charactersUsed = 2; | ||
break; | ||
case 0xC3: | ||
if(codepage == CODE_PAGE_737){ | ||
output.character = utf_to_cp737_c3(value1); | ||
} else { | ||
output.character = utf_to_cp437_c3(value1); | ||
} | ||
output.charactersUsed = 2; | ||
break; | ||
case 0xC6: | ||
output.character = utf_to_cp437_c6(value1); | ||
output.charactersUsed = 2; | ||
break; | ||
case 0xCE: | ||
if(codepage == CODE_PAGE_737){ | ||
output.character = utf_to_cp737_ce(value1); | ||
} else { | ||
output.character = utf_to_cp437_ce(value1); | ||
} | ||
output.charactersUsed = 2; | ||
break; | ||
case 0xCF: | ||
if(codepage == CODE_PAGE_737){ | ||
output.character = utf_to_cp737_cf(value1); | ||
} else { | ||
output.character = utf_to_cp437_cf(value1); | ||
} | ||
output.charactersUsed = 2; | ||
break; | ||
case 0xE2: | ||
if(codepage == CODE_PAGE_737){ | ||
output.character = utf_to_cp737_e2(value1, value2); | ||
} else { | ||
output.character = utf_to_cp437_e2(value1, value2); | ||
} | ||
output.charactersUsed = 3; | ||
break; | ||
default: | ||
output.character = UNKNOWN_CHAR_REPLACEMENT; | ||
output.charactersUsed = 1; | ||
} | ||
|
||
return output; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#define UNKNOWN_CHAR_REPLACEMENT 0xFE | ||
|
||
#define CODE_PAGE_737 737 | ||
#define CODE_PAGE_437 437 | ||
|
||
typedef struct | ||
{ | ||
//How many values was used during parsing | ||
int charactersUsed; | ||
|
||
//Page code of the character. Using int to avoid padding compilation problem | ||
// If character cannot be matched, will return UNKNOWN_CHAR_REPLACEMENT | ||
unsigned int character; | ||
|
||
} CONVERSION_OUTPUT; | ||
|
||
|
||
//Provide up to 3 bytes of the string to attempt to parse to code page | ||
CONVERSION_OUTPUT utf_to_cp(int codepage, int value0, int value1, int value2); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.