Index: uspace/srv/fs/fat/fat_directory.c
===================================================================
--- uspace/srv/fs/fat/fat_directory.c	(revision 411e9ca4c05cdce2a8dff0d8ea285ab781533982)
+++ uspace/srv/fs/fat/fat_directory.c	(revision 3e018e450667ffe7f8baf4256665029643ef1a22)
@@ -255,16 +255,9 @@
 {
 	int rc;
-	int long_entry_count;
-	uint8_t checksum;
-	wchar_t wname[FAT_LFN_NAME_SIZE];
-	size_t lfn_size, lfn_offset;
-	
-	rc = str_to_wstr(wname, FAT_LFN_NAME_SIZE, name);
-	if (rc != EOK)
-		return rc;
-	if (fat_dentry_is_sfn(wname)) {
+	bool enable_lfn = true; /* We can use this variable to switch off LFN support */
+	
+	if (fat_valid_short_name(name)) {
 		/* NAME could be directly stored in dentry without creating LFN */
 		fat_dentry_name_set(de, name);
-
 		if (fat_directory_is_sfn_exist(di, de))
 			return EEXIST;
@@ -273,13 +266,17 @@
 			return rc;
 		rc = fat_directory_write_dentry(di, de);
-		if (rc != EOK)
-			return rc;
-
-		return EOK;
-	}
-	else
-	{
+		return rc;
+	} else if (enable_lfn && fat_valid_name(name)) {
 		/* We should create long entries to store name */
-		lfn_size = wstr_length(wname);
+		int long_entry_count;
+		uint8_t checksum;
+		uint16_t wname[FAT_LFN_NAME_SIZE];
+		size_t lfn_size, lfn_offset;
+		
+		rc = str_to_utf16(wname, FAT_LFN_NAME_SIZE, name);
+		if (rc != EOK)
+			return rc;
+		
+		lfn_size = utf16_length(wname);
 		long_entry_count = lfn_size / FAT_LFN_ENTRY_SIZE;
 		if (lfn_size % FAT_LFN_ENTRY_SIZE)
@@ -291,5 +288,5 @@
 
 		/* Write Short entry */
-		rc = fat_directory_create_sfn(di, de, wname);
+		rc = fat_directory_create_sfn(di, de, name);
 		if (rc != EOK)
 			return rc;
@@ -322,11 +319,11 @@
 
 		rc = fat_directory_seek(di, start_pos+long_entry_count);
-		if (rc != EOK)
-			return rc;
-		return EOK;
-	}
-}
-
-int fat_directory_create_sfn(fat_directory_t *di, fat_dentry_t *de, const wchar_t *wname)
+		return rc;
+	}
+
+	return ENOTSUP;
+}
+
+int fat_directory_create_sfn(fat_directory_t *di, fat_dentry_t *de, const char *lname)
 {
 	char name[FAT_NAME_LEN+1];
@@ -337,15 +334,15 @@
 	memset(number, FAT_PAD, FAT_NAME_LEN);
 
-	size_t name_len = wstr_size(wname);
-	wchar_t *pdot = wstr_rchr(wname, '.');
+	size_t name_len = str_size(lname);
+	char *pdot = str_rchr(lname, '.');
 	ext[FAT_EXT_LEN] = '\0';
 	if (pdot) {
 		pdot++;
-		wstr_to_ascii(ext, pdot, FAT_EXT_LEN, FAT_SFN_CHAR);
-		name_len = (pdot - wname - 1);
+		str_to_ascii(ext, pdot, FAT_EXT_LEN, FAT_SFN_CHAR);
+		name_len = (pdot - lname - 1);
 	}
 	if (name_len > FAT_NAME_LEN)
 		name_len = FAT_NAME_LEN;
-	wstr_to_ascii(name, wname, name_len, FAT_SFN_CHAR);
+	str_to_ascii(name, lname, name_len, FAT_SFN_CHAR);
 
 	size_t idx;
Index: uspace/srv/fs/fat/fat_directory.h
===================================================================
--- uspace/srv/fs/fat/fat_directory.h	(revision 411e9ca4c05cdce2a8dff0d8ea285ab781533982)
+++ uspace/srv/fs/fat/fat_directory.h	(revision 3e018e450667ffe7f8baf4256665029643ef1a22)
@@ -68,5 +68,5 @@
 extern int fat_directory_lookup_free(fat_directory_t *di, size_t count);
 extern int fat_directory_write_dentry(fat_directory_t *di, fat_dentry_t *de);
-extern int fat_directory_create_sfn(fat_directory_t *di, fat_dentry_t *de, const wchar_t *wname);
+extern int fat_directory_create_sfn(fat_directory_t *di, fat_dentry_t *de, const char *lname);
 extern int fat_directory_expand(fat_directory_t *di);
 
