Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upfs/copy feature seems to have trouble with special characters like e.g. ä, ü, ö ... #7119
Comments
|
Nerdy Workaround: As I could not find a javascript / typescript based workaround yet, I trigger a shell script after fs/copy with something like: text=$1 replacing the Octal UTF-8 bytes 303 266 by ö :) |
|
ooh lemme at this one those utf8 characters won't even know what hit em |
|
@michael-spengler its ya boy, @cakekindel, comin' back at ya with some need for more information - i'm unable to reproduce this, could you provide the code / shell snippet you're using to trigger the bug, and OS / deno version you're using? I've written a test to cover this that is (maybe errantly?) passing currently, so I'm thinking it's time to gather more info (click to expand) code snippet: unit test for copyFile with unicode in name async function copyFileWithUnicodeInName(): Promise<void> {
const tmpDir = Deno.makeTempDirSync();
const destDir = Deno.makeTempDirSync({ dir: tmpDir, suffix: 'dest' });
const filename = "wow! ö.txt";
const fromPath = `${tmpDir}/${filename}`;
writeFileString(fromPath, "I have a naughty name!");
const toPath = `${destDir}/${filename}`;
await Deno.copyFile(fromPath, toPath);
const copiedFile = Array.from(Deno.readDirSync(destDir))[0];
try {
assertEquals(copiedFile.name, filename);
} finally {
Deno.removeSync(tmpDir, { recursive: true });
}
}, |


I copied a file which contains an 'ö' in its filename --> the copy feature made \303\266 out of the 'ö'.