HTML & JS
#include <stdio.h>
#include <string.h>
#include <ctype.h>
/* remove duplicates */

int get_index(char c) {
    return (c >= 'A' && c <= 'Z') ? c-'A' : c-'a';
}

int remove_duplicates(char *s) {
    int len = strlen(s), is_error = 0, alphabets[26] = {0}, index = -1, j = 0;
    for(int i = 0; i < len; i++) {
        if(!isalpha(s[i])) {
            is_error = 1;
        } else {
            index = get_index(s[i]);
            if(alphabets[index] == 0) {
                alphabets[index] = 1;
                s[j++] = s[i];
            }
        }
    }
    s[j] = '\0';
    return is_error;
}

int main() {
	char s[100];
	scanf("%s", s);
    int error = remove_duplicates(s);
    printf("%s", s);
    if(error) printf(" error\n");
	return 0;
}

Generated URL:

Output:

xy error
Report Bug