Как установить стандартное кодирование в Visual Studio

Вы можете сделать это, используя базу R

df <- unique(data.frame(Timestamp=as.POSIXct(strptime(c('2018-01-08 13:26:53', 
                                                        '2018-01-08 13:33:33', 
                                                        '2018-01-08 13:45:12', 
                                                        '2018-01-08 13:45:12', 
                                                        '2018-01-08 14:28:34', 
                                                        '2018-01-08 14:31:32',
                                                        '2018-01-08 14:31:32',
                                                        '2018-01-08 15:13:16',
                                                        '2018-01-08 15:25:19',
                                                        '2018-01-08 15:25:19',
                                                        '2018-01-08 15:25:19',
                                                        '2018-01-08 15:25:19'), "%Y-%m-%d %H:%M:%OS")),
                        Text=c('A', 'B', 'C', 'A', 'B', 'A', 'C', 'D', 'A', 'A', 'B', 'C')))



agg<- aggregate(df[,2], list(df[,1]), function(x) paste0(unique(x)))
78
задан Edward Brey 23 April 2019 в 13:36
поделиться

2 ответа

Я не знаю о глобальной калиевой селитре установки, но можно попробовать это:

  1. Сохраните все шаблоны Visual Studio в UTF-8
  2. Запишите Макрос/Дополнение Visual Studio, который будет слушать событие DocumentSaved и уже сохранит файл в формате UTF-8 (если не).
  3. Поместите прокси на свое управление исходным кодом, которое удостоверится, что новыми файлами всегда является UTF-8.
1
ответ дан Shay Erlichmen 24 November 2019 в 10:40
поделиться

Do you want the files to save as UTF-8 because you are using special characters that would be lost in ASCII encoding? If that's the case, then there is a VS2008 global setting in Tools > Options > Environment > Documents, named Save documents as Unicode when data cannot be saved in codepage. When this is enabled, VS2008 will save as Unicode if certain characters cannot be represented in the otherwise-default codepage.

Also, which files are not being saved as UTF-8? All of my .cs, .csproj, .sln, .config, .as*x, etc, all save as UTF-8 (with signature, the byte order marks), by default.

58
ответ дан 24 November 2019 в 10:40
поделиться
Другие вопросы по тегам:

Похожие вопросы: