Jump to content

Belgeyi Ansi Kodlama Türünde Kaydetme


Recommended Posts

Arkadaşlar bir sorunum var. şimdi bir notepad'i otomatik olarak ANSI kodlama türünde kaydetmek için aşağıdaki kodu kullanabilir miyiz?

;!@Install@!ANSI!

...

;!@InstallEnd@!

Teşekkürler...

Link to comment
Share on other sites

Kullanamayız.Çünkü ANSI yerine UTF-8 yazsan da ANSI olarak kaydeder.Kodlamayı "Farklı Kaydet" diyerek seçersin.

Ama Notepad zaten varsayılan olarak ANSI kodlamayla kaydediyor.Yani buna niçin ihtiyaç duyacaksın ki?

Link to comment
Share on other sites

autoitte lazımda. şimdi kişi programı kullanmadan önce utf-8 ile kayıt yaptıysa ikinciye default olarka utf-8 geliyor. ondan sormuştum...

Link to comment
Share on other sites

AutoIt'in yeni sürümlerinde FileGetEncoding komutu var,dosyanın kodlamasını alıyor.

Sanırım FileOpen komutundan ayarlaman gerekiyor dosyayı açarken.Çünkü FileOpen Komutunun açıklamasında öyle diyor:

filename Filename of the text file to open.

mode [optional] Mode to open the file in.

Can be a combination of the following:

0 = Read mode (default)

1 = Write mode (append to end of file)

2 = Write mode (erase previous contents)

8 = Create directory structure if it doesn't exist (See Remarks).

16 = Force binary mode (See Remarks).

32 = Use Unicode UTF16 Little Endian reading and writing mode. Reading does not override existing BOM.

64 = Use Unicode UTF16 Big Endian reading and writing mode. Reading does not override existing BOM.

128 = Use Unicode UTF8 (with BOM) reading and writing mode. Reading does not override existing BOM.

256 = Use Unicode UTF8 (without BOM) reading and writing mode.

16384 = When opening for reading and no BOM is present, use full file UTF8 detection. If this is not used then only the initial part of the file is checked for UTF8.

The folder path must already exist (except using mode '8' - See Remarks).

The file handle must be closed with the FileClose() function.

A file may fail to open due to access rights or attributes.

The default mode when writing text is ANSI - use the unicode flags to change this. When writing unicode files the Windows default mode (and the fastest in AutoIt due to the least conversion) is UTF16 Little Endian (mode 32).

Opening a file in write mode creates the file if it does not exist. Directories are not created unless the correct flag is used.

When reading and writing via the same file handle, the FileSetPos() function must be used to update the current file position.

Dosyayı düzenlemen için yine birkaç komut daha kullanman lazım.Ama onları tam bilmiyorum açıkçası.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...