travisjeffery / ClangFormat-Xcode

Xcode plug-in to to use clang-format from in Xcode and consistently format your code with Clang
https://twitter.com/travisjeffery
MIT License
2.89k stars 287 forks source link

format file with non-ascii characters #32

Closed plubanski closed 9 years ago

plubanski commented 10 years ago

Formatting files with non-ascii characters doesn't work. It's easier to show than describe whats wrong. input file:

#import "Example.h"
// ń
@implementation Example
-(void) doSomethingWithString:(NSString*) string{
}
@end

expected result with WebKit style

#import "Example.h"
// ń
@implementation Example
- (void)doSomethingWithString:(NSString*)string
{
}
@end

actual result

#import "Example.h"
// ń
@implementation Example
-( void) oSomethingWithString:(NSString*) tring{

}
@end

when i remove ń letter from comment everything works as expected. Formatting this file with command line clang-fomat works.